Skip to content

unsupported-method-call-on-all (PYI056)#

Derived from the flake8-pyi linter.

What it does#

Checks that append, extend and remove methods are not called on __all__.

Why is this bad?#

Different type checkers have varying levels of support for calling these methods on __all__. Instead, use the += operator to add items to __all__, which is known to be supported by all major type checkers.


__all__ = ["A"]

Use instead:

__all__ = ["A"]
__all__ += ["B"]