Skip to content

Fix pages modules is package #3315

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
May 29, 2025
Merged

Fix pages modules is package #3315

merged 3 commits into from
May 29, 2025

Conversation

T4rk1n
Copy link
Contributor

@T4rk1n T4rk1n commented May 29, 2025

Fix #3309

if module_name not in sys.modules:
return False
file = sys.modules[module_name].__file__
return file and file.endswith("__init__.py")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could this return empty string rather than a boolean?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No it's usage is in a condition here:

if _module_name_is_package(CONFIG.name):

Copy link
Contributor

@gvwilson gvwilson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

asked a question about return types

@T4rk1n T4rk1n merged commit ad9c197 into dev May 29, 2025
9 of 10 checks passed
@T4rk1n T4rk1n deleted the fix-pages-modules branch May 29, 2025 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] The _module_name_is_package function in _pages.py is problematic
2 participants