mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-05-06 21:43:59 +08:00
Remove support for pytype (#14463)
This commit is contained in:
@@ -6,7 +6,6 @@ import json
|
||||
import re
|
||||
import subprocess
|
||||
import sys
|
||||
from importlib.util import find_spec
|
||||
from pathlib import Path
|
||||
|
||||
from ts_utils.metadata import get_oldest_supported_python, read_metadata
|
||||
@@ -77,7 +76,6 @@ def main() -> None:
|
||||
python_version = get_oldest_supported_python()
|
||||
|
||||
stubtest_result: subprocess.CompletedProcess[bytes] | None = None
|
||||
pytype_result: subprocess.CompletedProcess[bytes] | None = None
|
||||
|
||||
print("\nRunning pre-commit...")
|
||||
pre_commit_result = subprocess.run(["pre-commit", "run", "--files", *path.rglob("*")], check=False)
|
||||
@@ -125,17 +123,6 @@ def main() -> None:
|
||||
else:
|
||||
print(colored("\nSkipping stubtest since mypy failed.", "yellow"))
|
||||
|
||||
if find_spec("pytype"):
|
||||
print("\nRunning pytype...")
|
||||
pytype_result = subprocess.run([sys.executable, "tests/pytype_test.py", path], check=False)
|
||||
else:
|
||||
print(
|
||||
colored(
|
||||
f"\nSkipping pytype on Windows. You need to install it first: `{sys.executable} -m pip install pytype` .",
|
||||
"yellow",
|
||||
)
|
||||
)
|
||||
|
||||
cases_path = test_cases_path(stub if folder == "stubs" else "stdlib")
|
||||
if not cases_path.exists():
|
||||
# No test means they all ran successfully (0 out of 0). Not all 3rd-party stubs have regression tests.
|
||||
@@ -186,7 +173,6 @@ def main() -> None:
|
||||
pyright_returncode,
|
||||
mypy_result.returncode,
|
||||
getattr(stubtest_result, "returncode", 0),
|
||||
getattr(pytype_result, "returncode", 0),
|
||||
pyright_testcases_returncode,
|
||||
regr_test_returncode,
|
||||
]
|
||||
@@ -218,10 +204,6 @@ def main() -> None:
|
||||
print("stubtest:", _SKIPPED)
|
||||
else:
|
||||
print("stubtest:", _SUCCESS if stubtest_result.returncode == 0 else _FAILED)
|
||||
if not pytype_result:
|
||||
print("pytype:", _SKIPPED)
|
||||
else:
|
||||
print("pytype:", _SUCCESS if pytype_result.returncode == 0 else _FAILED)
|
||||
if pyright_testcases_skipped:
|
||||
print("Pyright regression tests:", _SKIPPED)
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user