Skip to content

Add a flag --enable-all-error-codes, which enables all error codes #19048

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

Open
wants to merge 23 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
3f952b9
add all error code
wyattscarpenter May 7, 2025
31e2b72
formatting fixes
wyattscarpenter May 7, 2025
c0e6aeb
manual experimentation reveals that this code only works for the comm…
wyattscarpenter May 7, 2025
469de61
add a spotcheck test for error code all
wyattscarpenter May 8, 2025
ccb62cb
oh, right, overrides is in typing_extensions
wyattscarpenter May 8, 2025
34d218e
I guess these need tuples
wyattscarpenter May 8, 2025
035d4d6
since I'm getting more weird errors, let's try builtins fixtures/prim…
wyattscarpenter May 8, 2025
0d50f97
...try typing fixtures/typing-full.pyi
wyattscarpenter May 8, 2025
b8fbb34
ok now tuple is missing again. so let's try both
wyattscarpenter May 8, 2025
dd4a343
try tuple simple
wyattscarpenter May 8, 2025
787c680
fix all of the test fixture complaints
wyattscarpenter May 8, 2025
07710bf
begin pivoting to --enable-all-error-codes
wyattscarpenter May 11, 2025
6728040
pivot to --enable-all-error-codes flag
wyattscarpenter May 11, 2025
465ea8c
document, and add a new test
wyattscarpenter May 11, 2025
9e98209
fix some typos / confusing language I found along the way
wyattscarpenter May 11, 2025
0b32309
improve documentation
wyattscarpenter May 11, 2025
ad5dac3
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] May 11, 2025
8066787
remember that I was supposed to mention this in --strict
wyattscarpenter May 11, 2025
7bae510
allow --enable-all-error-codes to be countermanded
wyattscarpenter May 11, 2025
bf1fc81
new tests for countermanding
wyattscarpenter May 11, 2025
ff5f284
Merge branch 'master' into error_code_all
wyattscarpenter Jun 4, 2025
65f6bcc
another test that would work if enable-all-error-codes was also a per…
wyattscarpenter Jul 30, 2025
22e56a8
-xfail testSpotCheckEnableAllErrorCodesConfigCountermand for error_co…
wyattscarpenter Jul 31, 2025
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
Prev Previous commit
Next Next commit
improve documentation
  • Loading branch information
wyattscarpenter committed May 11, 2025
commit 0b32309cb075e5f2a37465550967f4161aec395b
19 changes: 11 additions & 8 deletions docs/source/command_line.rst
Original file line number Diff line number Diff line change
Expand Up @@ -768,7 +768,7 @@ of the above sections.

.. option:: --disable-error-code

This flag allows disabling one or multiple error codes globally.
This flag disables one or multiple error codes globally.
See :ref:`error-codes` for more information.

.. code-block:: python
Expand All @@ -783,7 +783,7 @@ of the above sections.

.. option:: --enable-error-code

This flag allows enabling one or multiple error codes globally.
This flag enables one or multiple error codes globally.
See :ref:`error-codes` for more information.

Note: This flag will override disabled error codes from the
Expand All @@ -803,19 +803,22 @@ of the above sections.

This flag enables all of the error codes for mypy,
including the optional ones that are off by default.
See :ref:`error-codes` for more information.
See :ref:`error-codes` and :ref:`error-codes-optional`
for more information.

This flag will override disabled error codes from the
:option:`--disable-error-code <mypy --disable-error-code>` flag.

Note that future releases of mypy will likely introduce more error codes,
so the effective behavior of this flag will change from release to release.
so the effective result of using this flag will change from release to
release.

While often useful, this flag will enable **all** error codes,
including those that may be experimental, wrongheaded, or contradictory.
While often useful, keep in mind that this flag will enable **all** error
codes, including any that may be experimental, wrongheaded, or
contradictory.

It is not the same as enabling all checks that mypy could perform;
for example, :option:`--strict-bytes` is not enabled by this flag.
Enabling all codes is not the same as enabling all checks that mypy could
perform; for example, :option:`--strict-bytes` is not enabled by this flag.

.. _configuring-error-messages:

Expand Down
Loading
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy