From 5d36e1250747c8b7d796a11ec89a7ad2781cf6a1 Mon Sep 17 00:00:00 2001 From: KotlinIsland <65446343+kotlinisland@users.noreply.github.com> Date: Thu, 28 Nov 2024 17:09:12 +1000 Subject: [PATCH] update docs to specify error codes and strict mode --- CHANGELOG.md | 3 ++- docs/source/error_code_list.rst | 17 ++++++++++------- docs/source/error_code_list2.rst | 15 ++++++++------- docs/source/error_codes.rst | 6 +++--- docs/source/existing_code.rst | 2 +- 5 files changed, 24 insertions(+), 19 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1041fb342..4c9652687 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,7 +1,8 @@ # Basedmypy Changelog ## [Unreleased] - +### Docs +- correct error code documentation regarding defaults ## [2.7.0] ### Added diff --git a/docs/source/error_code_list.rst b/docs/source/error_code_list.rst index 73171131b..ccb9e7e86 100644 --- a/docs/source/error_code_list.rst +++ b/docs/source/error_code_list.rst @@ -1,12 +1,15 @@ .. _error-code-list: -Error codes enabled by default -============================== - -This section documents various errors codes that mypy can generate -with default options. See :ref:`error-codes` for general documentation -about error codes. :ref:`error-codes-optional` documents additional -error codes that you can enable. +Error codes part 1 +================== + +This section documents various errors codes that basedmypy will +generate with default options or when :confval:`strict` if off (`no_strict`). +See :ref:`error-codes` for general documentation +about error codes. :ref:`error-codes-strict` documents additional +error codes that are enabled with :confval:`strict` (the default). +:ref:`error-codes-based` documents error codes that are unique +to basedmypy. .. _code-attr-defined: diff --git a/docs/source/error_code_list2.rst b/docs/source/error_code_list2.rst index 6d50e217a..4eb6a6726 100644 --- a/docs/source/error_code_list2.rst +++ b/docs/source/error_code_list2.rst @@ -1,12 +1,13 @@ -.. _error-codes-optional: +.. _error-codes-strict: -Error codes for optional checks -=============================== +Error codes for strict checks +============================= -This section documents various errors codes that mypy generates only -if you enable certain options. See :ref:`error-codes` for general -documentation about error codes and their configuration. -:ref:`error-code-list` documents error codes that are enabled by default. +This section documents various errors codes that basedmypy generates +by default, but will be disabled when :confval:`strict` is false (`no_strict`). +See :ref:`error-codes` for general documentation about error codes +and their configuration. :ref:`error-code-list` documents error codes +that are enabled regardless of :confval:`strict`. .. note:: diff --git a/docs/source/error_codes.rst b/docs/source/error_codes.rst index 485d70cb5..617765f1a 100644 --- a/docs/source/error_codes.rst +++ b/docs/source/error_codes.rst @@ -11,9 +11,9 @@ after each error message. Error codes serve two purposes: potentially more serious errors. 2. The error code can be used to find documentation about the error. - The next two topics (:ref:`error-code-list` and - :ref:`error-codes-optional`) document the various error codes - mypy can report. + The next three topics (:ref:`error-code-list`, + :ref:`error-codes-strict` and :ref:`error-codes-based`) document the + various error codes basedmypy can report. Most error codes are shared between multiple related error messages. Error codes may change in future mypy releases. diff --git a/docs/source/existing_code.rst b/docs/source/existing_code.rst index cd5ef6f73..3dc748c88 100644 --- a/docs/source/existing_code.rst +++ b/docs/source/existing_code.rst @@ -246,7 +246,7 @@ annotations for, in order to prevent new code from being added without annotatio And if you want, it doesn't stop at ``--strict``. Mypy has additional checks that are not part of ``--strict`` that can be useful. See the complete -:ref:`command-line` reference and :ref:`error-codes-optional`. +:ref:`command-line` reference and :ref:`error-codes-strict`. Speed up mypy runs ------------------