Skip to content

Commit d80ed13

Browse files
Fix doctest for get_protocol_members
1 parent 9215c95 commit d80ed13

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Unreleased
22

3+
- Fix doctest of `typing_extensions.get_protocol_members`.
34
- Fix incorrect behaviour on Python 3.9 and Python 3.10 that meant that
45
calling `isinstance` with `typing_extensions.Concatenate[...]` or
56
`typing_extensions.Unpack[...]` as the first argument could have a different

src/typing_extensions.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3864,8 +3864,8 @@ def get_protocol_members(tp: type, /) -> typing.FrozenSet[str]:
38643864
>>> class P(Protocol):
38653865
... def a(self) -> str: ...
38663866
... b: int
3867-
>>> get_protocol_members(P)
3868-
frozenset({'a', 'b'})
3867+
>>> get_protocol_members(P) == frozenset({'a', 'b'})
3868+
True
38693869
38703870
Raise a TypeError for arguments that are not Protocols.
38713871
"""

0 commit comments

Comments
 (0)