From 36a90b014b4aeceaef12116db8d89cf313b817f8 Mon Sep 17 00:00:00 2001 From: njg7194 Date: Sun, 1 Feb 2026 13:10:45 +0900 Subject: [PATCH] Enable --pretty by default This change enables the --pretty option by default, which shows visually nicer error messages with source code snippets and error location markers. Users can still use --no-pretty to get the previous concise output format. Closes #19108 --- docs/source/command_line.rst | 1 + docs/source/config_file.rst | 2 +- mypy/options.py | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/docs/source/command_line.rst b/docs/source/command_line.rst index b5081f113f917..a01c9c85515ac 100644 --- a/docs/source/command_line.rst +++ b/docs/source/command_line.rst @@ -937,6 +937,7 @@ in error messages. Use visually nicer output in error messages: use soft word wrap, show source code snippets, and show error location markers. + This is enabled by default. Use ``--no-pretty`` to disable. .. option:: --no-color-output diff --git a/docs/source/config_file.rst b/docs/source/config_file.rst index 77f9524710075..b226d2c9e9550 100644 --- a/docs/source/config_file.rst +++ b/docs/source/config_file.rst @@ -904,7 +904,7 @@ These options may only be set in the global section (``[mypy]``). .. confval:: pretty :type: boolean - :default: False + :default: True Use visually nicer output in error messages: use soft word wrap, show source code snippets, and show error location markers. diff --git a/mypy/options.py b/mypy/options.py index 9bfbc5f68af8d..39137dfe2443e 100644 --- a/mypy/options.py +++ b/mypy/options.py @@ -365,7 +365,7 @@ def __init__(self) -> None: self.hide_error_codes = False self.show_error_code_links = False # Use soft word wrap and show trimmed source snippets with error location markers. - self.pretty = False + self.pretty = True self.dump_graph = False self.dump_deps = False self.logical_deps = False