I\'m doing PEP8 checks in python using the python flake8 library. I have an import statement in an __init__.py file in one of my sub-modules which looks like this:<
__init__.py
This is not actually a PEP8 violation. I simply do this:
from .my_class import MyClass # noqa
Edit: Another possibility is to use __all__. In that case, flake8 understands what is going on:
__all__
from .my_class import MyClass __all__ = ['MyClass',]