Skip to content

Commit a312da9

Browse files
committed
Clarify and reposition the helpful comment
1 parent c2ff476 commit a312da9

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Lib/typing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2159,8 +2159,8 @@ 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.
21632162
if cls._is_protocol and getattr(cls, '_is_runtime_protocol', False):
2163+
# This flag is set to False by @runtime_checkable.
21642164
cls._is_deprecated_inherited_runtime_protocol = True
21652165

21662166
# Set (or override) the protocol subclass hook.

0 commit comments

Comments
 (0)