Skip to content

Commit 2f077b6

Browse files
authored
Fix __init_subclass__ using self instead of class (#31135)
1 parent fea7290 commit 2f077b6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Lib/typing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ class _Final:
349349

350350
__slots__ = ('__weakref__',)
351351

352-
def __init_subclass__(self, /, *args, **kwds):
352+
def __init_subclass__(cls, /, *args, **kwds):
353353
if '_root' not in kwds:
354354
raise TypeError("Cannot subclass special typing classes")
355355

0 commit comments

Comments
 (0)