Skip to content

Commit 36a90b0

Browse files
author
njg7194
committed
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
1 parent 5f3e6ec commit 36a90b0

3 files changed

Lines changed: 3 additions & 2 deletions

File tree

docs/source/command_line.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -937,6 +937,7 @@ in error messages.
937937

938938
Use visually nicer output in error messages: use soft word wrap,
939939
show source code snippets, and show error location markers.
940+
This is enabled by default. Use ``--no-pretty`` to disable.
940941

941942
.. option:: --no-color-output
942943

docs/source/config_file.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -904,7 +904,7 @@ These options may only be set in the global section (``[mypy]``).
904904
.. confval:: pretty
905905

906906
:type: boolean
907-
:default: False
907+
:default: True
908908

909909
Use visually nicer output in error messages: use soft word wrap,
910910
show source code snippets, and show error location markers.

mypy/options.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -365,7 +365,7 @@ def __init__(self) -> None:
365365
self.hide_error_codes = False
366366
self.show_error_code_links = False
367367
# Use soft word wrap and show trimmed source snippets with error location markers.
368-
self.pretty = False
368+
self.pretty = True
369369
self.dump_graph = False
370370
self.dump_deps = False
371371
self.logical_deps = False

0 commit comments

Comments
 (0)