As in the example at https://github.com/python/mypy/issues/4108, the right way to implement __getitem__ is to implement overloads for the int and slice argument cases. We probably don't do this consistently, partly because we have disabled the warning (it used to be buggy).
So we need to do the following:
Change the mypy filters in the makefile to let Signature of "__getitem__" errors through.
Check every implementation of Sequence.__getitem__ to make sure we're doing it right.
As in the example at https://github.com/python/mypy/issues/4108, the right way to implement
__getitem__
is to implement overloads for the int and slice argument cases. We probably don't do this consistently, partly because we have disabled the warning (it used to be buggy).So we need to do the following:
Signature of "__getitem__"
errors through.Sequence.__getitem__
to make sure we're doing it right.