You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
By default wildcard import imports all the names, which do not start with underscore.
However, it is possible to limit names, which might be imported by defining __all__ variable in the module. Only items listed in __all__ variable can be imported from this module.
This should be reflected in the behavior of deadcode.
Example:
foo.py
__all__ = ['foo', 'bar']
foo = 1
bar = 2
spam = 3
bar.py
from foo import *
print(foo)
print(bar)
# Should raise an error, because `spam` was not imported:
print(spam)
The text was updated successfully, but these errors were encountered:
By default wildcard import imports all the names, which do not start with underscore.
However, it is possible to limit names, which might be imported by defining
__all__
variable in the module. Only items listed in__all__
variable can be imported from this module.This should be reflected in the behavior of deadcode.
Example:
foo.py
bar.py
The text was updated successfully, but these errors were encountered: