File tree Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Expand file tree Collapse file tree 1 file changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -923,9 +923,27 @@ in error messages.
923923 Use visually nicer output in error messages: use soft word wrap,
924924 show source code snippets, and show error location markers.
925925
926+ .. option :: --color-output[=auto]
927+
928+ Enables colored output in error messages.
929+
930+ When ``--color-output=auto `` is given, uses colored output if the output
931+ (both stdout and stderr) is going to a tty. This is also the default.
932+
933+ .. note ::
934+ When the environment variable ``MYPY_FORCE_COLOR `` is set to a
935+ non-``0 `` non-empty string, mypy always enables colored output
936+ (even if ``--no-color-output `` is given).
937+
938+ .. Note: Here I decide not to document ``FORCE_COLOR`` as its
939+ logic seems counter-intuitive from earlier conventions
940+ (PR13853)
941+
926942 .. option :: --no-color-output
927943
928- This flag will disable color output in error messages, enabled by default.
944+ Disables colored output in error messages.
945+
946+ See also note above.
929947
930948.. option :: --no-error-summary
931949
You can’t perform that action at this time.
0 commit comments