From: Gregory Beauregard Date: Sat, 5 Feb 2022 15:50:00 +0000 (-0800) Subject: Fix __init_subclass__ using self instead of class (#31135) X-Git-Tag: v3.11.0a6~309 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=2f077b6991f59c51989b65618317297c1eb0fb95;p=thirdparty%2FPython%2Fcpython.git Fix __init_subclass__ using self instead of class (#31135) --- diff --git a/Lib/typing.py b/Lib/typing.py index 0cf9755022e9..e4e32b5b320d 100644 --- a/Lib/typing.py +++ b/Lib/typing.py @@ -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")