Open
Description
Hi
Based on this discussion on pyright: microsoft/pyright#7989 (comment)
A collections.deque
is a valid typing.Sequence
. However, typing.Sequence
allows being sliceable, while a collections.deque
does not support slicing. This makes room to make errors that is not caught by static type checkers like pyright and mypy.
It seems like this normally would be reported, but the errors are suppressed by type-ignore comments found here.
Is there any other way of handling this so that trying to slice a deque would result in a type-error?