basedmypy icon indicating copy to clipboard operation
basedmypy copied to clipboard

no error when using subscripted `collections.abc.*` in runtime position when targeting python 3.8

Open DetachHead opened this issue 1 year ago • 1 comments

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

DetachHead avatar Jan 08 '24 01:01 DetachHead

another example:

from collections.abc import Iterator, cast

a = Iterator[int]

DetachHead avatar Jan 08 '24 01:01 DetachHead