Open Horgix opened 3 years ago
Currently, modules import a lot of their submodules in their __init__.py so they can be easily imported by users with from myAwesomeModule import *.
import
__init__.py
from 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)
__all__
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)