# Storage of uncollectable GC objects (gc.garbage)
-GC_GARBAGE = []
+GC_GARBAGE: list[object] = []
def _load_run_test(result: TestResult, runtests: RunTests) -> None:
# Enable most stricter settings
enable_error_code = ignore-without-code
strict = True
-strict_bytes = True
-local_partial_types = True
warn_unreachable = True
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)
# ...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
# 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