Describe the Bug
Reproducer:
class A:
@classmethod
def create(*args, **kwargs): ...
A.create(42)
Output:
ERROR Argument `Literal[42]` is not assignable to parameter `*args` with type `type[A]` in function `A.create` [bad-argument-type]
--> /tmp/foo.py:6:10
|
6 | A.create(42)
| ^^
|
Note that the first parameter of create is already bound by the time we type check the call. So, it seems confusing to type check 42 as if it is going to be bound to the cls parameter.
Sandbox Link
No response
(Only applicable for extension issues) IDE Information
No response
Describe the Bug
Reproducer:
Output:
Note that the first parameter of
createis already bound by the time we type check the call. So, it seems confusing to type check42as if it is going to be bound to theclsparameter.Sandbox Link
No response
(Only applicable for extension issues) IDE Information
No response