Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ff81a1c

Browse files
authored
Remove is_classmethod_class slot from CallableType (#16151)
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` ```
1 parent 7089a7f commit ff81a1c

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

mypy/types.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1763,8 +1763,6 @@ class CallableType(FunctionLike):
17631763
"definition", # For error messages. May be None.
17641764
"variables", # Type variables for a generic function
17651765
"is_ellipsis_args", # Is this Callable[..., t] (with literal '...')?
1766-
"is_classmethod_class", # Is this callable constructed for the benefit
1767-
# of a classmethod's 'cls' argument?
17681766
"implicit", # Was this type implicitly generated instead of explicitly
17691767
# specified by the user?
17701768
"special_sig", # Non-None for signatures that require special handling

0 commit comments

Comments
 (0)