Skip to content

Commit

Permalink
Remove is_classmethod_class slot from CallableType (#16151)
Browse files Browse the repository at this point in the history
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`
```
  • Loading branch information
sobolevn authored Sep 20, 2023
1 parent 7089a7f commit ff81a1c
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions mypy/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ff81a1c

Please sign in to comment.