Skip to content

Mention ignore_errors in exclude docs #18412

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 2, 2025
Merged
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: 5 additions & 4 deletions docs/source/command_line.rst
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,11 @@ for full details, see :ref:`running-mypy`.
checked. For instance, ``mypy --exclude '/setup.py$'
but_still_check/setup.py``.

In particular, ``--exclude`` does not affect mypy's :ref:`import following
<follow-imports>`. You can use a per-module :confval:`follow_imports` config
option to additionally avoid mypy from following imports and checking code
you do not wish to be checked.
In particular, ``--exclude`` does not affect mypy's discovery of files
via :ref:`import following <follow-imports>`. You can use a per-module
:confval:`ignore_errors` config option to silence errors from a given module,
or a per-module :confval:`follow_imports` config option to additionally avoid
mypy from following imports and checking code you do not wish to be checked.

Note that mypy will never recursively discover files and directories named
"site-packages", "node_modules" or "__pycache__", or those whose name starts
Expand Down
Loading