8000 mypy error reporting should include column position · Issue #1216 · python/mypy · GitHub
[go: up one dir, main page]

Skip to content

mypy error reporting should include column position #1216

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
zen0wu opened this issue Feb 14, 2016 · 8 comments · Fixed by #2163
Closed

mypy error reporting should include column position #1216

zen0wu opened this issue Feb 14, 2016 · 8 comments · Fixed by #2163
Labels

Comments

@zen0wu
Copy link
zen0wu commented Feb 14, 2016

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
@JukkaL JukkaL added the feature label Feb 15, 2016
@JukkaL
Copy link
Collaborator
JukkaL commented 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
Copy link
Collaborator
ddfisher commented Mar 1, 2016

Yeah, the parser rewrite should make this info easily available.

@ddfisher ddfisher added this to the Future milestone Mar 1, 2016
@bavardage
Copy link
Contributor

was there any progress here? pretty interested in this too

@gvanrossum
Copy link
Member

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
Copy link
Contributor

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
Copy link
Member
gvanrossum commented Sep 13, 2016 via email

gvanrossum pushed a commit that referenced this issue Sep 25, 2016
When mypy is run with `--show-column-numbers`, error messages include columns.

Column numbers are 0-based.

Fixes #1216.
@gvanrossum gvanrossum modified the milestones: 0.4.x, Future Sep 25, 2016
@gvanrossum
Copy link
Member

This was done. Thanks to Ben Duffield! Note that you need to use --show-column-numbers.

@zen0wu
Copy link
Author
zen0wu commented Sep 26, 2016

Thank you so much guys! This is amazing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants
0