Fix __init_subclass__ using self instead of class (#31135)

This commit is contained in:
Gregory Beauregard 2022-02-05 07:50:00 -08:00 committed by GitHub
parent fea7290a0e
commit 2f077b6991
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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")