mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 13:04:46 +08:00
runtests: Run pre-commit only on specified files (#11949)
This commit is contained in:
@@ -78,12 +78,12 @@ def main() -> None:
|
||||
if folder not in {"stdlib", "stubs"}:
|
||||
parser.error("Only the 'stdlib' and 'stubs' folders are supported.")
|
||||
if not os.path.exists(path):
|
||||
parser.error(rf"'path' {path} does not exist.")
|
||||
parser.error(f"{path=} does not exist.")
|
||||
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", "--all-files"])
|
||||
pre_commit_result = subprocess.run(["pre-commit", "run", "--files", *Path(path).rglob("*")])
|
||||
|
||||
print("\nRunning check_typeshed_structure.py...")
|
||||
check_structure_result = subprocess.run([sys.executable, "tests/check_typeshed_structure.py"])
|
||||
|
||||
Reference in New Issue
Block a user