Skip to content

Commit 6615cab

Browse files
cdce8pAlexWaygood
andauthored
[Release 1.9] Stubtest: ignore a new protocol dunder (#16895) (#16899)
This is added to all protocol classes on Python 3.12.2+ (it was added in a patch release of 3.12 as part of a bugfix). There's no reason why you'd want to explicitly include it in a stub (and doing so would lead the type checker to incorrectly conclude that you wanted a member literally called `__non_callable_proto_members__`) Cf. python/typeshed#11384 and python/typeshed#11383 (cherry picked from commit 517f5ae) Co-authored-by: Alex Waygood <[email protected]>
1 parent b956e6a commit 6615cab

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

mypy/stubtest.py

+1
Original file line numberDiff line numberDiff line change
@@ -1486,6 +1486,7 @@ def verify_typealias(
14861486
# Added to all protocol classes on 3.12+ (or if using typing_extensions.Protocol)
14871487
"__protocol_attrs__",
14881488
"__callable_proto_members_only__",
1489+
"__non_callable_proto_members__",
14891490
# typing implementation details, consider removing some of these:
14901491
"__parameters__",
14911492
"__origin__",

0 commit comments

Comments
 (0)