Closed
Description
The Python 3.5 docs list a typing.io
something ("wrapper namespace" according to docs, class according to interpreter), which you can access with IO
to get an IO type, or for example TextIO
. Using this in an interpreter works fine, but mypy complains about this.
>>> typing.io.IO[str]
typing.IO[str]
>>> typing.io.TextIO
typing.TextIO[str]
prettify.py:40: error: Name 'typing.io.IO' is not defined
I understand (now) that typing.IO
is also possible, but the docs are very vague about that being a possibility, which is why I didn't even try it. Docs aside, since this works in the interpreter I think it should also work in mypy, which is why I'm reporting it.
Metadata
Metadata
Assignees
Labels
No labels