Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions docs/source/command_line.rst
Original file line number Diff line number Diff line change
Expand Up @@ -924,6 +924,15 @@ in error messages.
``file:line:column:end_line:end_column``. This option implies
``--show-column-numbers``.

.. option:: --show-error-codes

This flag will show the error code ``[<code>]`` after each error message. This is the
default behavior::

prog.py:1: error: "str" has no attribute "trim" [attr-defined]

See :ref:`error-codes` for more information.

.. option:: --hide-error-codes

This flag will hide the error code ``[<code>]`` from error messages. By default, the error
Expand Down
9 changes: 9 additions & 0 deletions docs/source/config_file.rst
Original file line number Diff line number Diff line change
Expand Up @@ -894,6 +894,15 @@ These options may only be set in the global section (``[mypy]``).

Shows documentation link to corresponding error code.

.. confval:: show_error_codes

:type: boolean
:default: True

Shows error codes in error messages. See :ref:`error-codes` for more information.

This is the default behavior. To hide error codes, use :confval:`hide_error_codes` instead.

.. confval:: hide_error_codes

:type: boolean
Expand Down