You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
mypy error reporting should include column position #1216
Currently it seems that only line number is included, and confusion will be introduced when there's multiple errors in the same line. Is there any plans to improve this?
typecheck_error.py: note: In function "f":
typecheck_error.py:2: error: Unsupported operand types for * ("str" and "complex")
typecheck_error.py:2: error: Incompatible return value type: expected builtins.int, got builtins.complex
I apologize, we have been occupied with higher priority projects. Thanks for showing your interest though -- we'll be sure to bump the priority eventually. (We also accept PRs of course.)
We're phasing out parse.py, but yes, both fastparse{,2}.py would need to be
updated. The big question is whether typed_ast, which we use for the actual
parser, is collecting this info. If not, we have to modify typed_ast first.
Activity
JukkaL commentedon Feb 15, 2016
It would be nice to have the column numbers as well. We are planning a parser rewrite and that might make this easy enough to implement.
ddfisher commentedon Mar 1, 2016
Yeah, the parser rewrite should make this info easily available.
bavardage commentedon Sep 13, 2016
was there any progress here? pretty interested in this too
gvanrossum commentedon Sep 13, 2016
I apologize, we have been occupied with higher priority projects. Thanks for showing your interest though -- we'll be sure to bump the priority eventually. (We also accept PRs of course.)
bavardage commentedon Sep 13, 2016
happy to attempt a PR at some point, not super familiar with the code yet
thoughts:
for the parser, this would mean modifying both fastparse, fastparse2 and parse?
gvanrossum commentedon Sep 13, 2016
Add column number support (#2163)
gvanrossum commentedon Sep 25, 2016
This was done. Thanks to Ben Duffield! Note that you need to use
--show-column-numbers.zen0wu commentedon Sep 26, 2016
Thank you so much guys! This is amazing!