File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11# Lightweight Python formatting/lint for scenario workloads. Matches the ruff job in ci.yml.
2- # Install: pip install pre-commit && pre-commit install
2+ # Local: ./scripts/lint (check) or ./scripts/format (auto-fix)
3+ # Optional hooks (skipped when core.hooksPath is set): pip install pre-commit && pre-commit install
34repos :
45 - repo : https://github.com/astral-sh/ruff-pre-commit
56 rev : v0.15.5
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+ set -euo pipefail
3+
4+ root=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) /.." && pwd) "
5+ cd " $root "
6+
7+ if ! command -v ruff > /dev/null 2>&1 ; then
8+ echo " ruff not found; install with: pip install ruff==0.15.5" >&2
9+ exit 1
10+ fi
11+
12+ targets=(" $@ " )
13+ if [ " ${# targets[@]} " -eq 0 ]; then
14+ targets=(" ." )
15+ fi
16+
17+ ruff format " ${targets[@]} "
18+ ruff check --fix " ${targets[@]} "
Original file line number Diff line number Diff line change 1+ #! /usr/bin/env bash
2+ set -euo pipefail
3+
4+ # Matches the ruff job in .github/workflows/ci.yml (see also scripts/format).
5+ root=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) /.." && pwd) "
6+ cd " $root "
7+
8+ if ! command -v ruff > /dev/null 2>&1 ; then
9+ echo " ruff not found; install with: pip install ruff==0.15.5" >&2
10+ exit 1
11+ fi
12+
13+ targets=(" $@ " )
14+ if [ " ${# targets[@]} " -eq 0 ]; then
15+ targets=(" ." )
16+ fi
17+
18+ ruff format --check " ${targets[@]} "
19+ ruff check " ${targets[@]} "
You can’t perform that action at this time.
0 commit comments