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
asd.py:6: error: No overload variant of "__setitem__" of "list" matches argument types [builtins.int, Tuple[builtins.int, builtins.int]]
so __setitem__ with slice works but not with index.
Not specifing the type does work (it is just an example, the code I'm working on need to explicit a specific variable).
I don't think it is an issue in typeshed as playing with builtins.list do not change a thing.
btw, simply exchanging the @overload __setitem__ gives me weirder errors, like
asd.py:1: note: In module imported here:
/home/tharvik/mypy/typeshed/stdlib/3/builtins.pyi: note: In class "list":
/home/tharvik/mypy/typeshed/stdlib/3/builtins.pyi:477: error: Signature of "__setitem__" incompatible with supertype "MutableSequence"
asd.py: note: At top level:
asd.py:6: error: No overload variant of "__setitem__" of "list" matches argument types [builtins.int, Tuple[builtins.int, builtins.int]]
The order shouldn't matter, right? (I didn't see it written in the PEP anyway)
The text was updated successfully, but these errors were encountered:
gives
so
__setitem__
with slice works but not with index.Not specifing the type does work (it is just an example, the code I'm working on need to explicit a specific variable).
I don't think it is an issue in typeshed as playing with builtins.list do not change a thing.
btw, simply exchanging the
@overload __setitem__
gives me weirder errors, likeThe order shouldn't matter, right? (I didn't see it written in the PEP anyway)
The text was updated successfully, but these errors were encountered: