Skip to content

Commit

Permalink
Run ruff format in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
sandhose committed Sep 2, 2024
1 parent 81f1a3f commit 2b2db9e
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/fix_lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,14 @@ jobs:
with:
install-project: "false"

- name: Run ruff
- name: Run ruff check
continue-on-error: true
run: poetry run ruff check --fix .

- name: Run ruff format
continue-on-error: true
run: poetry run ruff format --quiet .

- run: cargo clippy --all-features --fix -- -D warnings
continue-on-error: true

Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,12 @@ jobs:
with:
install-project: "false"

- name: Check style
- name: Run ruff check
run: poetry run ruff check --output-format=github .

- name: Run ruff format
run: poetry run ruff format --check .

lint-mypy:
runs-on: ubuntu-latest
name: Typechecking
Expand Down
3 changes: 3 additions & 0 deletions scripts-dev/lint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,9 @@ set -x
# --quiet suppresses the update check.
ruff check --quiet --fix "${files[@]}"

# Reformat Python code.
ruff format --quiet "${files[@]}"

# Catch any common programming mistakes in Rust code.
#
# --bins, --examples, --lib, --tests combined explicitly disable checking
Expand Down

0 comments on commit 2b2db9e

Please sign in to comment.