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

Restrict which names are replaced #5

Open
asmeurer opened this issue Jul 21, 2019 · 1 comment
Open

Restrict which names are replaced #5

asmeurer opened this issue Jul 21, 2019 · 1 comment

Comments

@asmeurer
Copy link
Owner

We should

  • Make sure __all__ is respected
  • Don't include names that shouldn't be imported from a module. For now the main thing here is other modules, or at least standard library imports.
@asmeurer asmeurer reopened this Aug 17, 2019
@asmeurer
Copy link
Owner Author

__all__ now works and __builtins__ is excluded in dynamic imports. Not sure if we should remove other stuff, especially in the dynamic importing. Currently if you have an __init__.py without __all__ all submodules that have been imported are included in import *. However, I suppose these might be legitimately used (but the static importer doesn't attempt to add them). Stuff likeimport sys could be excluded, but perhaps it is better to just keep it as exact as possible.

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