From ff81a1c7abc91d9984fc73b9f2b9eab198001c8e Mon Sep 17 00:00:00 2001 From: Nikita Sobolev Date: Wed, 20 Sep 2023 13:50:48 +0300 Subject: [PATCH] Remove `is_classmethod_class` slot from `CallableType` (#16151) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This slot was not used anywhere: ``` ยป ag is_classmethod_class . ``` Moreover, since it was not initialized this code was failing with `AttributeError`: ```python x: CallableType for i in dir(x): print(i, getattr(x, i)) # failing on `is_classmethod_class` ``` --- mypy/types.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/mypy/types.py b/mypy/types.py index 22fcd601d6a0e..2b5aec7789f70 100644 --- a/mypy/types.py +++ b/mypy/types.py @@ -1763,8 +1763,6 @@ class CallableType(FunctionLike): "definition", # For error messages. May be None. "variables", # Type variables for a generic function "is_ellipsis_args", # Is this Callable[..., t] (with literal '...')? - "is_classmethod_class", # Is this callable constructed for the benefit - # of a classmethod's 'cls' argument? "implicit", # Was this type implicitly generated instead of explicitly # specified by the user? "special_sig", # Non-None for signatures that require special handling