Use __all__
to declare modules public APIs (would also fix F401 warnings)
#47
Labels
__all__
to declare modules public APIs (would also fix F401 warnings)
#47
Currently, modules
import
a lot of their submodules in their__init__.py
so they can be easily imported by users withfrom myAwesomeModule import *
.However, since these import are not actually used in these
__init__.py
, they trigger the F401 "Module imported but unused" warning.Moreover, it's recommended by the PEP8 that modules declare their public API through
__all__
(See PEP8 → Public and Internal interfaces)The text was updated successfully, but these errors were encountered: