Closed DrewDevereux closed 4 months ago
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.
__init__.py
The fix is for __init__.py files to provide an explicit __all__.
__all__
Meanwhile, downstream packages can workaround this by adding to mypy.ini
mypy.ini
[mypy-transitions] implicit_reexport = True
When in strict mode, mypy objects to imports from transitions with errors like
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