Skip to content

Commit

Permalink
runtests: Run pre-commit only on specified files (#11949)
Browse files Browse the repository at this point in the history
  • Loading branch information
Avasam authored May 18, 2024
1 parent 55b5521 commit 1230ced
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tests/runtests.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"])
Expand Down

0 comments on commit 1230ced

Please sign in to comment.