Fix __init_subclass__ using self instead of class (#31135)
This commit is contained in:
parent
fea7290a0e
commit
2f077b6991
@ -349,7 +349,7 @@ class _Final:
|
||||
|
||||
__slots__ = ('__weakref__',)
|
||||
|
||||
def __init_subclass__(self, /, *args, **kwds):
|
||||
def __init_subclass__(cls, /, *args, **kwds):
|
||||
if '_root' not in kwds:
|
||||
raise TypeError("Cannot subclass special typing classes")
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user