mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
Fix __init_subclass__ using self instead of class (#31135)
This commit is contained in:
parent
fea7290a0e
commit
2f077b6991
1 changed files with 1 additions and 1 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue