Skip to content

Commit c2ff476

Browse files
committed
Add helpful comment about _is_deprecated_inherited_runtime_protocol
1 parent 4807a81 commit c2ff476

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

Lib/typing.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2159,6 +2159,7 @@ def __init_subclass__(cls, *args, **kwargs):
21592159
cls._is_protocol = any(b is Protocol for b in cls.__bases__)
21602160

21612161
# Mark inherited runtime checkability (deprecated). See GH-132604.
2162+
# This is overwritten to False when @runtime_checkable is applied.
21622163
if cls._is_protocol and getattr(cls, '_is_runtime_protocol', False):
21632164
cls._is_deprecated_inherited_runtime_protocol = True
21642165

0 commit comments

Comments
 (0)