generics are removed from function signatures that are assigned to Callable
types
#17050
Labels
bug
mypy got something wrong
Callable
types
#17050
playground
use case
i'm making a
@NoInstance
decorator that bans usages ofclassmethod
s on instances:but the primary use case for class methods that should not be called on instances are constructor methods, which means the resulting signature only has the typevar on the return type (in this case,
Self
):The text was updated successfully, but these errors were encountered: