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
from collection import Iterable, Iterator
class IterableWrapper(Iterator, Iterable, BaseWrapper):
...
And a function type definition later going:
# type: (...) -> IterableWrapper[tuple[T, T2]]
Mypy complains:
src/ww/wrappers/iterables.py:600: error: "IterableWrapper" expects no type arguments, but 1 given
While:
# type: (...) -> IterableWrapper and # type: (...) -> Iterable[tuple[T, T2]] don't get any warning.
I was expecting that, inheriting from Iterable, I could do IterableWrapper[tuple[T, T2]] like I would do Iterable[tuple[T, T2]] and benefit from code checking on yielded elements.