From cb6de36eeb0d9bef76807af5669b1658af725579 Mon Sep 17 00:00:00 2001 From: Aristotelis Mikropoulos Date: Mon, 5 Oct 2020 22:15:06 +0300 Subject: [PATCH 1/4] Documented disable_error_code --- docs/source/config_file.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/source/config_file.rst b/docs/source/config_file.rst index f45eceacbe67..6ad7ed39cc0d 100644 --- a/docs/source/config_file.rst +++ b/docs/source/config_file.rst @@ -529,6 +529,12 @@ Miscellaneous strictness flags Allows variables to be redefined with an arbitrary type, as long as the redefinition is in the same block and nesting level as the original definition. +.. confval:: disable_error_code + + :type: comma-separated list of strings + + Causes mypy to suppress errors with given error codes. + .. confval:: implicit_reexport :type: boolean From ca9893d72c4695408f071e1e50d16794a22976b1 Mon Sep 17 00:00:00 2001 From: Aristotelis Mikropoulos Date: Mon, 5 Oct 2020 22:20:45 +0300 Subject: [PATCH 2/4] Documented disable error code cli option --- docs/source/command_line.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/source/command_line.rst b/docs/source/command_line.rst index ed40803510d4..d7f63fd8c9d0 100644 --- a/docs/source/command_line.rst +++ b/docs/source/command_line.rst @@ -480,6 +480,11 @@ of the above sections. # 'items' now has type List[List[str]] ... +.. option:: --disable-error-code CODE + + This flag will cause mypy to suppress errors with error code ``CODE``. + This flag may be repeated. + .. option:: --local-partial-types In mypy, the most common cases for partial types are variables initialized using ``None``, From 6c2e289a1a586352d7c8f63212b058b2038e819b Mon Sep 17 00:00:00 2001 From: Aristotelis Mikropoulos Date: Mon, 5 Oct 2020 22:40:23 +0300 Subject: [PATCH 3/4] Removed duplicate doc entry for disable error code --- docs/source/command_line.rst | 5 ----- 1 file changed, 5 deletions(-) diff --git a/docs/source/command_line.rst b/docs/source/command_line.rst index d7f63fd8c9d0..ed40803510d4 100644 --- a/docs/source/command_line.rst +++ b/docs/source/command_line.rst @@ -480,11 +480,6 @@ of the above sections. # 'items' now has type List[List[str]] ... -.. option:: --disable-error-code CODE - - This flag will cause mypy to suppress errors with error code ``CODE``. - This flag may be repeated. - .. option:: --local-partial-types In mypy, the most common cases for partial types are variables initialized using ``None``, From bc8269ecbbf193a5597b28291cb36e04c7877f55 Mon Sep 17 00:00:00 2001 From: Aristotelis Mikropoulos Date: Mon, 5 Oct 2020 23:14:07 +0300 Subject: [PATCH 4/4] Made language consistent with cli docs Co-authored-by: Shantanu <12621235+hauntsaninja@users.noreply.github.com> --- 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 6ad7ed39cc0d..28aa58bb56a6 100644 --- a/docs/source/config_file.rst +++ b/docs/source/config_file.rst @@ -533,7 +533,7 @@ Miscellaneous strictness flags :type: comma-separated list of strings - Causes mypy to suppress errors with given error codes. + Allows disabling one or multiple error codes globally. .. confval:: implicit_reexport