This is not a violation of PEP8. I just do this:
from .my_class import MyClass
Edit: Another possibility is to use __all__ . In this case, flake8 understands what happens:
from .my_class import MyClass __all__ = ['MyClass',]
RenΓ© fleschenberg
source share