Skip to content

mypy error reporting should include column position #1216

Closed

Description

@zen0wu

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

Activity

  1. JukkaL commented on Feb 15, 2016

    @JukkaL
    Collaborator

    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.

  2. ddfisher commented on Mar 1, 2016

    @ddfisher
    Collaborator

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

  3. added this to the milestone on Mar 1, 2016
  4. bavardage commented on Sep 13, 2016

    @bavardage
    Contributor

    was there any progress here? pretty interested in this too

  5. gvanrossum commented on Sep 13, 2016

    @gvanrossum
    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.)

  6. bavardage commented on Sep 13, 2016

    @bavardage
    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?

  7. gvanrossum commented on Sep 13, 2016

    @gvanrossum
    Member
  8. added a commit that references this issue on Sep 25, 2016
    fde83d5
  9. modified the milestones: , on Sep 25, 2016
  10. gvanrossum commented on Sep 25, 2016

    @gvanrossum
    Member

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

  11. zen0wu commented on Sep 26, 2016

    @zen0wu
    Author

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions