8000
"Overloaded function implementation does not accept all possible arguments" #11391
Labels
8000
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: