mirror of
https://github.com/python/cpython.git
synced 2026-06-17 07:13:29 +00:00
[3.14] Update mypy to 2.1.0 (GH-149709) (#149712)
Update mypy to 2.1.0 (GH-149709)
(cherry picked from commit b546cc10f5)
Co-authored-by: sobolevn <mail@sobolevn.me>
This commit is contained in:
parent
49bf2d1cbd
commit
73675ec3de
5 changed files with 5 additions and 9 deletions
|
|
@ -145,7 +145,7 @@ def regrtest_runner(result: TestResult, test_func, runtests: RunTests) -> None:
|
|||
|
||||
|
||||
# Storage of uncollectable GC objects (gc.garbage)
|
||||
GC_GARBAGE = []
|
||||
GC_GARBAGE: list[object] = []
|
||||
|
||||
|
||||
def _load_run_test(result: TestResult, runtests: RunTests) -> None:
|
||||
|
|
|
|||
|
|
@ -12,6 +12,4 @@ pretty = True
|
|||
# Enable most stricter settings
|
||||
enable_error_code = ignore-without-code
|
||||
strict = True
|
||||
strict_bytes = True
|
||||
local_partial_types = True
|
||||
warn_unreachable = True
|
||||
|
|
|
|||
|
|
@ -416,7 +416,7 @@ def get_location(self, modinfo: ModuleInfo) -> pathlib.Path | None:
|
|||
def _check_file(self, modinfo: ModuleInfo, spec: ModuleSpec) -> None:
|
||||
"""Check that the module file is present and not empty"""
|
||||
if spec.loader is BuiltinImporter: # type: ignore[comparison-overlap]
|
||||
return
|
||||
return # type: ignore[unreachable]
|
||||
try:
|
||||
assert spec.origin is not None
|
||||
st = os.stat(spec.origin)
|
||||
|
|
|
|||
|
|
@ -23,8 +23,6 @@ python_version = 3.10
|
|||
|
||||
# ...And be strict:
|
||||
strict = True
|
||||
strict_bytes = True
|
||||
local_partial_types = True
|
||||
extra_checks = True
|
||||
enable_error_code = ignore-without-code,redundant-expr,truthy-bool,possibly-undefined
|
||||
warn_unreachable = True
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Requirements file for external linters and checks we run on
|
||||
# Tools/clinic, Tools/cases_generator/, and Tools/peg_generator/ in CI
|
||||
mypy==1.19.1
|
||||
mypy==2.1.0
|
||||
|
||||
# needed for peg_generator:
|
||||
types-psutil==7.2.2.20260130
|
||||
types-setuptools==82.0.0.20260210
|
||||
types-psutil==7.2.2.20260508
|
||||
types-setuptools==82.0.0.20260508
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue