transitions
transitions copied to clipboard
Explicitly reexport package names
When in strict mode, mypy objects to imports from transitions with errors like
error: Module "transitions.extensions" does not explicitly export attribute "LockedMachine"; implicit reexport disabled [attr-defined]
This occurs because the __init__.py
files import names into the package namespace, but do not explicitly reexport them.
The fix is for __init__.py
files to provide an explicit __all__
.
Meanwhile, downstream packages can workaround this by adding to mypy.ini
[mypy-transitions]
implicit_reexport = True