Bad error message surrounding generic type aliases being Any
when it's really just unbound
#11549
Labels
bug
mypy got something wrong
This error message is confusing, because it's implying it's
Any
when it's actually not, it looks like the error message is wrong.I would think an error message like
Invalid self argument "Type[A[T]]" to attribute function "bar" with type "Callable[[Type[A[int]]], None]"
would be more accurate.Also, with the
foo
example, why is it only complaining on the type alias and not on the raw usage? This is inconsistent with the class method exampleThe text was updated successfully, but these errors were encountered: