basedmypy
basedmypy copied to clipboard
no error when using subscripted `collections.abc.*` in runtime position when targeting python 3.8
from collections.abc import Iterator
Iterator[int]
https://mypy-play.net/?mypy=basedmypy-2.3.0&python=3.8&gist=b28202ab91d513b652d8abca87ef02a8
This is because the defs in _collections_abc just import from typing
another example:
from collections.abc import Iterator, cast
a = Iterator[int]