forked from python/cpython
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[3.12] pythongh-109413: libregrtest: enable mypy's `--strict-optional…
…` check on most files (python#112586) (python#112602) pythongh-109413: libregrtest: enable mypy's `--strict-optional` check on most files (python#112586) Co-authored-by: Victor Stinner <vstinner@python.org>
- Loading branch information
1 parent
4fc010c
commit 36dbebe
Showing
4 changed files
with
48 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# Config file for running mypy on libregrtest. | ||
# Run mypy by invoking `mypy --config-file Lib/test/libregrtest/mypy.ini` | ||
# on the command-line from the repo root | ||
|
||
[mypy] | ||
files = Lib/test/libregrtest | ||
explicit_package_bases = True | ||
python_version = 3.12 | ||
platform = linux | ||
pretty = True | ||
|
||
# Enable most stricter settings | ||
enable_error_code = ignore-without-code | ||
strict = True | ||
|
||
# Various stricter settings that we can't yet enable | ||
# Try to enable these in the following order: | ||
disallow_any_generics = False | ||
disallow_incomplete_defs = False | ||
disallow_untyped_calls = False | ||
disallow_untyped_defs = False | ||
check_untyped_defs = False | ||
warn_return_any = False | ||
|
||
disable_error_code = return | ||
|
||
# Enable --strict-optional for these ASAP: | ||
[mypy-Lib.test.libregrtest.main.*,Lib.test.libregrtest.run_workers.*] | ||
strict_optional = False | ||
|
||
# Various internal modules that typeshed deliberately doesn't have stubs for: | ||
[mypy-_abc.*,_opcode.*,_overlapped.*,_testcapi.*,_testinternalcapi.*,test.*] | ||
ignore_missing_imports = True |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters