Skip to content

Enable --pretty by default #19108

Description

@JukkaL

Feature

Enable --pretty by default. --no-pretty can still be used to get more concise error messages (it already works, so no need to implement it).

--pretty causes mypy to show the line with the error, and mypy will highlight the location on the line where the error was reported:

foo.py:13: error: List item 0 has incompatible type "str"; expected "int"  [list-item]
    aa = ["x"]
          ^~~

Also update documentation, including relevant command-line examples which show the error output from mypy.

Pitch

The additional context makes it easier to see what is wrong. For example, there may be multiple possible expressions which can generate the error, and the highlighting makes this obvious.

Activity

  1. mkaraev commented on May 19, 2025

    @mkaraev

    @JukkaL can I work on this issue?

  2. wyattscarpenter commented on May 19, 2025

    @wyattscarpenter
    Contributor

    @mkaraev There is no process in the mypy repo for requiring permission to work on an issue. Therefore: you can!

  3. mkaraev commented on May 19, 2025

    @mkaraev

    Oh, okay. Great then :)

  4. Big-Marvel commented on Sep 6, 2025

    @Big-Marvel

    Is this issue resolved?

  5. added a commit that references this issue on Feb 1, 2026
    36a90b0
  6. added a commit that references this issue on Feb 8, 2026
    8b0041d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions