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
I've taken the overload definitions from this example (?) but perhaps I'm doing this incorrectly?
For now I can # type: ignore but seems non-ideal
Here's my version information and current output
$ mypy --versionmypy 0.740
$ mypy t3.pyt3.py:39: error: Invalid index type "Union[int, slice]" for "List[str]"; expected type "int"t3.py:39: error: Incompatible types in assignment (expression has type "Union[str, Iterable[str]]", target has type "str")Found 2 errors in 1 file (checked 1 source file)
The text was updated successfully, but these errors were encountered:
This is kind of ugly however. I think we can use the overload information and type-check body multiple times in simple cases, i.e. if neither *args nor **kwargs appear in any of the overloads and in the implementation.
I'm trying to implement my own
MutableSequence
but struggling with the proper way to implement the@overload
Here's my code example:
I've taken the overload definitions from this example (?) but perhaps I'm doing this incorrectly?
For now I can
# type: ignore
but seems non-idealHere's my version information and current output
The text was updated successfully, but these errors were encountered: