When mypy analyzes the following code: ``` filename = 'some.txt' with open(filename) as fh: c = cast(TextIOWrapper, fh) next(c) # skip line ``` it yields the following error: `error: No overload variant of "next" matches argument types [io.TextIOWrapper]` Since [TextIOWrapper](https://docs.python.org/3/library/io.html#io.TextIOWrapper) implements the **next**() method (which is even autocompleted by PyCharm IDE), I would not expect this error to be thrown.
Activity
jhagerer commentedon Sep 8, 2016
For the moment I make a workaround like this: