From 1d1086018bbd7170c32db60d01da094eee80ca9c Mon Sep 17 00:00:00 2001 From: sobolevn Date: Sat, 8 Feb 2025 13:00:49 +0300 Subject: [PATCH] Add `--strict-bytes` and `--local-partial-types` to self check (#13476) * Add `--strict-bytes` and `--local-patial-types` to self check These two options will be on by default in `--strict` in `mypy@2.0` * Annotate `_LOADERS` in `pytype_test` --- tests/pytype_test.py | 2 +- tests/typecheck_typeshed.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/pytype_test.py b/tests/pytype_test.py index ea1a12c20..7e3eeb735 100755 --- a/tests/pytype_test.py +++ b/tests/pytype_test.py @@ -40,7 +40,7 @@ from ts_utils.utils import SupportedVersionsDict, parse_stdlib_versions_file, su TYPESHED_SUBDIRS = ["stdlib", "stubs"] TYPESHED_HOME = "TYPESHED_HOME" -_LOADERS = {} +_LOADERS: dict[str, tuple[pytype_config.Options, load_pytd.Loader]] = {} def main() -> None: diff --git a/tests/typecheck_typeshed.py b/tests/typecheck_typeshed.py index ea90b0ac0..2fa853ad7 100755 --- a/tests/typecheck_typeshed.py +++ b/tests/typecheck_typeshed.py @@ -55,6 +55,8 @@ def run_mypy_as_subprocess(directory: str, platform: str, version: str) -> Retur "--python-version", version, "--strict", + "--strict-bytes", + "--local-partial-types", "--pretty", "--show-traceback", "--no-error-summary",