Open AlexWaygood opened 1 year ago
On the other hand, maybe typeshed_client is right: maybe this is an invalid stub.
In stdlib/collections/abc.pyi
, we do from _collections_abc import __all__ as __all__
. That implies that _collections.abc.__all__
is being re-exported from collections.abc
in stdlib/collections/abc.pyi
. But it's not, as "__all__"
is not included in _collections.abc.__all__
, and the contents of __all__
is what decides whether something is publicly re-exported or not.
Maybe in the stub, we should actually be doing:
from _collections_abc import __all__ as _collections_abc___all__
__all__ = _collections_abc___all__
Reproducer from inside a typeshed clone:
It looks like an issue to do with
__all__
. Possibly becausecollections.abc
does the unusualfrom _collections_abc import __all__ as __all__
thing.