Skip to content

Commit 0c435bc

Browse files
committed
ruff check non-blocking
1 parent 14a6671 commit 0c435bc

File tree

3 files changed

+12
-3
lines changed

3 files changed

+12
-3
lines changed

.github/workflows/benchmark.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,9 @@ jobs:
4747
# Compare against the previous benchmark if available
4848
# Fail if performance degrades by more than 10%
4949
if [ -d ".benchmarks" ]; then
50-
BASELINE=$(ls -t .benchmarks/Linux-CPython-3.10-64bit | head -n 2 | tail -n 1)
51-
CURRENT=$(ls -t .benchmarks/Linux-CPython-3.10-64bit | head -n 1)
50+
benchmark_dir=".benchmarks/Linux-CPython-3.10-64bit"
51+
BASELINE=$(ls -t $benchmark_dir | head -n 2 | tail -n 1)
52+
CURRENT=$(ls -t $benchmark_dir | head -n 1)
5253
if [ -n "$BASELINE" ] && [ "$BASELINE" != "$CURRENT" ]; then
5354
# Set full paths to the benchmark files
5455
BASELINE_FILE="$benchmark_dir/$BASELINE"

.github/workflows/lint.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ jobs:
3232
3333
- name: Lint with ruff
3434
run: |
35-
ruff check .
35+
# Run ruff but don't fail the build yet (exit-zero)
36+
ruff check . --exit-zero
3637
3738
- name: Type check with mypy
3839
run: |

.pre-commit-config.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,13 @@ repos:
2121
additional_dependencies: [flake8-bugbear, flake8-comprehensions]
2222
exclude: .venv
2323

24+
- repo: https://github.com/astral-sh/ruff-pre-commit
25+
rev: v0.3.4
26+
hooks:
27+
- id: ruff
28+
args: [--fix, --exit-non-zero-on-fix]
29+
exclude: .venv
30+
2431
- repo: https://github.com/pre-commit/mirrors-prettier
2532
rev: v4.0.0-alpha.8
2633
hooks:

0 commit comments

Comments
 (0)