]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fix __init_subclass__ using self instead of class (#31135)
authorGregory Beauregard <greg@greg.red>
Sat, 5 Feb 2022 15:50:00 +0000 (07:50 -0800)
committerGitHub <noreply@github.com>
Sat, 5 Feb 2022 15:50:00 +0000 (07:50 -0800)
Lib/typing.py

index 0cf9755022e9b891b0b909265d55157ea040174e..e4e32b5b320d046ba327f21ce7fdd5c0a79acc60 100644 (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")