Skip to content

Commit

Permalink
update docs to specify error codes and strict mode
Browse files Browse the repository at this point in the history
  • Loading branch information
KotlinIsland committed Nov 29, 2024
1 parent 0935784 commit 5d36e12
Show file tree
Hide file tree
Showing 5 changed files with 24 additions and 19 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# Basedmypy Changelog

## [Unreleased]

### Docs
- correct error code documentation regarding defaults

## [2.7.0]
### Added
Expand Down
17 changes: 10 additions & 7 deletions docs/source/error_code_list.rst
Original file line number Diff line number Diff line change
@@ -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:

Expand Down
15 changes: 8 additions & 7 deletions docs/source/error_code_list2.rst
Original file line number Diff line number Diff line change
@@ -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::

Expand Down
6 changes: 3 additions & 3 deletions docs/source/error_codes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion docs/source/existing_code.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
------------------
Expand Down

0 comments on commit 5d36e12

Please sign in to comment.