From 21d39b295f463fc76a00a6d0199a9839628a180e Mon Sep 17 00:00:00 2001 From: Tapasweni Pathak Date: Tue, 3 Sep 2019 15:43:38 +0530 Subject: [PATCH 1/5] config_file.rst: Document how to suppress colorized output and summary line Fixes https://github.com/python/mypy/issues/7439. --- docs/source/config_file.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/source/config_file.rst b/docs/source/config_file.rst index 69475baf2bb7..c4d8173a0b1e 100644 --- a/docs/source/config_file.rst +++ b/docs/source/config_file.rst @@ -401,6 +401,11 @@ section of the command line docs. ``show_column_numbers`` (bool, default False) Shows column numbers in error messages. +``color_output`` (bool, default True) + Shows error messages with color enabled. + +``error_summary`` (bool, default True) + Shows error messages with any stats summary. Advanced options ---------------- From 3e56c78a9dce9117e5acd19484c59e69bf59e719 Mon Sep 17 00:00:00 2001 From: Tapasweni Pathak Date: Wed, 4 Sep 2019 19:16:42 +0530 Subject: [PATCH 2/5] command_line.rst: Document colorized output and summary line --- docs/source/command_line.rst | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/docs/source/command_line.rst b/docs/source/command_line.rst index ace34df1432b..0d3bd9a193b4 100644 --- a/docs/source/command_line.rst +++ b/docs/source/command_line.rst @@ -449,6 +449,22 @@ in error messages. main.py:12:9: error: Unsupported operand types for / ("int" and "str") +``--no-color-output`` + This flag will disable color output in error messages, enabled by default. + +``--error-summary`` + This flag will show error messages with stats summary, + for example, the following indicates an error summary:: + from typing import List + x = [] # type: List[float] + y = [] # type: List[int] + x = y + bad.py:4: error: Incompatible types in assignment (expression has type + "List[int]", variable has type "List[float]") + bad.py:4: note: "List" is invariant -- see + http://mypy.readthedocs.io/en/latest/common_issues.html#variance + bad.py:4: note: Consider using "Sequence" instead, which is covariant + Found 1 error in 1 file (checked 1 source file) .. _incremental: From 1d7aee65c736fafbf562f16fcc6f4dd8ce82fe63 Mon Sep 17 00:00:00 2001 From: Tapasweni Pathak Date: Wed, 4 Sep 2019 20:02:44 +0530 Subject: [PATCH 3/5] Remove long snippet and add description --- docs/source/command_line.rst | 17 ++++------------- 1 file changed, 4 insertions(+), 13 deletions(-) diff --git a/docs/source/command_line.rst b/docs/source/command_line.rst index 0d3bd9a193b4..fb8c6c167527 100644 --- a/docs/source/command_line.rst +++ b/docs/source/command_line.rst @@ -452,19 +452,10 @@ in error messages. ``--no-color-output`` This flag will disable color output in error messages, enabled by default. -``--error-summary`` - This flag will show error messages with stats summary, - for example, the following indicates an error summary:: - from typing import List - x = [] # type: List[float] - y = [] # type: List[int] - x = y - bad.py:4: error: Incompatible types in assignment (expression has type - "List[int]", variable has type "List[float]") - bad.py:4: note: "List" is invariant -- see - http://mypy.readthedocs.io/en/latest/common_issues.html#variance - bad.py:4: note: Consider using "Sequence" instead, which is covariant - Found 1 error in 1 file (checked 1 source file) +``--no-error-summary`` + This flag will show error messages with stats summary, enabled by default. + By default mypy shows a summary line including total number of errors, + number of files with errors, and number of files checked. .. _incremental: From e1afb0581596b7072a1b9520e530e0b2b59c1aa3 Mon Sep 17 00:00:00 2001 From: Tapasweni Pathak Date: Wed, 4 Sep 2019 20:26:59 +0530 Subject: [PATCH 4/5] Rephrase description Co-Authored-By: Ivan Levkivskyi --- docs/source/config_file.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/config_file.rst b/docs/source/config_file.rst index c4d8173a0b1e..beb2b3cead82 100644 --- a/docs/source/config_file.rst +++ b/docs/source/config_file.rst @@ -405,7 +405,7 @@ section of the command line docs. Shows error messages with color enabled. ``error_summary`` (bool, default True) - Shows error messages with any stats summary. + Shows a short summary line after error messages. Advanced options ---------------- From 18ff3d6f34090f58ab8ddcb6f7d8335f4acbe196 Mon Sep 17 00:00:00 2001 From: Ivan Levkivskyi Date: Wed, 4 Sep 2019 16:02:19 +0100 Subject: [PATCH 5/5] Small rewording --- docs/source/command_line.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/source/command_line.rst b/docs/source/command_line.rst index fb8c6c167527..26d1fb8081a3 100644 --- a/docs/source/command_line.rst +++ b/docs/source/command_line.rst @@ -453,9 +453,9 @@ in error messages. This flag will disable color output in error messages, enabled by default. ``--no-error-summary`` - This flag will show error messages with stats summary, enabled by default. - By default mypy shows a summary line including total number of errors, - number of files with errors, and number of files checked. + This flag will disable error summary. By default mypy shows a summary line + including total number of errors, number of files with errors, and number + of files checked. .. _incremental: