chore: make tests run on scripts + fix linting (#10580)

This commit is contained in:
Stefano Fiorucci
2026-02-12 16:21:15 +01:00
committed by GitHub
parent 9a03e76d0a
commit 8a27f5ad0e
3 changed files with 6 additions and 1 deletions
+1
View File
@@ -23,6 +23,7 @@ on:
- "test/**/*.py"
- "pyproject.toml"
- ".github/utils/*.py"
- "scripts/*.py"
env:
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
@@ -17,6 +17,7 @@ on:
- "test/**/*.py"
- "pyproject.toml"
- ".github/utils/*.py"
- "scripts/*.py"
jobs:
check_if_changed:
@@ -40,6 +41,7 @@ jobs:
- "test/**/*.py"
- "pyproject.toml"
- ".github/utils/*.py"
- "scripts/*.py"
trigger-catch-all:
name: Tests completed
+3 -1
View File
@@ -113,7 +113,9 @@ def main() -> int:
for path in args.files:
with open(path) as f:
original = f.read()
new = PYTHON_FENCE_RE.sub(lambda m: _format_code_block(m, line_length=args.line_length, path=path), original)
new = PYTHON_FENCE_RE.sub(
lambda m, path=path: _format_code_block(m, line_length=args.line_length, path=path), original
)
if new != original:
with open(path, "w") as f:
f.write(new)