Further improve non-types dependency handling in pytype_test.py (#10393)

This commit is contained in:
Alex Waygood
2023-07-01 00:24:38 +01:00
committed by GitHub
parent 7fdd05003a
commit 39fd112f3e
4 changed files with 24 additions and 15 deletions

View File

@@ -13,7 +13,7 @@ from utils import colored, print_error
ReturnCode: TypeAlias = int
SUPPORTED_PLATFORMS = ("linux", "darwin", "win32")
SUPPORTED_VERSIONS = ("3.12", "3.11", "3.10")
SUPPORTED_VERSIONS = ("3.12", "3.11", "3.10", "3.9")
LOWEST_SUPPORTED_VERSION = min(SUPPORTED_VERSIONS, key=lambda x: int(x.split(".")[1]))
DIRECTORIES_TO_TEST = ("scripts", "tests")
EMPTY: list[str] = []
@@ -63,6 +63,8 @@ def run_mypy_as_subprocess(directory: str, platform: str, version: str) -> Retur
"possibly-undefined",
"--enable-error-code",
"redundant-expr",
"--custom-typeshed-dir",
".",
]
if directory == "tests" and platform == "win32":
command.extend(["--exclude", "tests/pytype_test.py"])