Vermeille / Torchelie

Torchélie is a set of utility functions, layers, losses, models, trainers and other things for PyTorch.
https://torchelie.readthedocs.org/
MIT License
111 stars 11 forks source link

Use `__all__` to declare modules public APIs (would also fix F401 warnings) #47

Open Horgix opened 3 years ago

Horgix commented 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 *.

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)