Skip to content
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

Names that start with an underscore should not be included #12

Open
asmeurer opened this issue Aug 18, 2019 · 1 comment
Open

Names that start with an underscore should not be included #12

asmeurer opened this issue Aug 18, 2019 · 1 comment

Comments

@asmeurer
Copy link
Owner

Unless __all__ is defined, names that start with an underscore aren't included with import *. Right now they aren't properly filtered in the static importer.

@asmeurer
Copy link
Owner Author

asmeurer commented Sep 4, 2019

There's a subtlety with recursive imports. If we have

# a.py
_x = 1
__all__ = ['_x']
# b.py
from .a import *
# c.py
from .b import *

then _x should be marked as imported in b.py, but not in c.py.

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

No branches or pull requests

1 participant