Uh oh!
There was an error while loading. Please reload this page.
stubtest: fix false-positive error for Protocol __init__s and Protocol __annotations__ - #13179
Conversation
hauntsaninja
left a comment
There was a problem hiding this comment.
Should this check whether runtime.__init__ is Protocol.__init__? E.g., given python/cpython#31628
AlexWaygood
commented
Jul 19, 2022
I sank some time into this, but I think it might be more trouble than it's worth. The check would be much more complicated than a simple It's probably doable, but would you accept this patch as-is for now, with a TODO comment saying that we should probably check |
Yup, I'd merge a TODO! |
__init__s__init__s and Protocol __annotations__The output if I run typeshed's +note: unused allowlist entry importlib.abc.Traversable.__init__+note: unused allowlist entry importlib.metadata.PackageMetadata.__init__+note: unused allowlist entry importlib.metadata._meta.PackageMetadata.__init__+note: unused allowlist entry importlib.metadata._meta.SimplePath.__init__+note: unused allowlist entry typing.SupportsAbs.__init__+note: unused allowlist entry typing.SupportsBytes.__init__+note: unused allowlist entry typing.SupportsComplex.__init__+note: unused allowlist entry typing.SupportsFloat.__init__+note: unused allowlist entry typing.SupportsIndex.__init__+note: unused allowlist entry typing.SupportsInt.__init__+note: unused allowlist entry typing.SupportsRound.__init__ |
Fixes#12820