lib2to3_parse assumes that the ParseError will always refer to an existing line #1
Comments
The Doesn't directly affect this bug, but will likely help you reproduce the problem. |
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There seems to be a case where
ParseError
will report the line number after the last line number, causing anIndexError
in retype:Example file (core.py):
Example stub (types/core.pyi):
I haven't gone digging yet to see why the
Driver
is failing to parse this, but it seems that this should be fixed as well.Tested using:
Python 3.6.1 (v3.6.1:69c0db5, Mar 21 2017, 17:54:52) [MSC v.1900 32 bit (Intel)] on win32
Python 3.6.1 (default, May 11 2017, 22:14:44) [GCC 4.9.2] on linux
The text was updated successfully, but these errors were encountered: