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
new tests for countermanding
  • Loading branch information
wyattscarpenter committed May 11, 2025
commit bf1fc81ffb672bbfa5a93dcbaf1ef1e081c02315
8 changes: 8 additions & 0 deletions test-data/unit/check-flags.test
Original file line number Diff line number Diff line change
Expand Up @@ -2534,3 +2534,11 @@ enable_all_error_codes = True

\[mypy-tests.*]
disable_error_code = ignore-without-code

[case testSpotCheckEnableAllErrorCodesCountermand]
# flags: --enable-all-error-codes --disable-error-code unused-ignore
x = 2 # type: ignore # E: "type: ignore" comment without error code

[case testSpotCheckEnableAllErrorCodesCountermandCountermand]
# flags: --enable-all-error-codes --disable-error-code ignore-without-code --disable-error-code unused-ignore --enable-error-code ignore-without-code
x = 2 # type: ignore # E: "type: ignore" comment without error code
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