You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
$ mypy xxx.py
xxx.py:14: error: Overloaded functionimplementation does not accept all possible arguments of signature 1
Note that the second overload referencing the type variable used in the first overload is necessary; if pattern: int is used instead of pattern: T in the second overload, mypy type-checks the file correctly.
Uh oh!
There was an error while loading. Please reload this page.
False positive; mypy doesn't believe that
Foo[T]
is a subtype ofT
.Note that the second overload referencing the type variable used in the first overload is necessary; if
pattern: int
is used instead ofpattern: T
in the second overload, mypy type-checks the file correctly.Environment
Related issues
**kwargs: Union[None, int, str]
overload isn't accepted by**kwargs: Any
Type[T1]
isn't accepted byUnion[Type[T1], Type[T2]]
I think that #10390 fixes this issue, but I'm not sure.
The text was updated successfully, but these errors were encountered: