Skip to content

Commit

Permalink
Change justfile recipes to format with Ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
StevenMaude committed Aug 22, 2024
1 parent 241415f commit b456b01
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ default_language_version:
repos:
- repo: local
hooks:
- id: black
name: black
entry: just black
- id: format
name: format
entry: just format
language: system
types: [python]
require_serial: true
Expand Down
8 changes: 4 additions & 4 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,8 @@ test *args: assets
$BIN/pytest -n auto -m "not verification and not slow_test" {{ args }}


black *args=".": devenv
$BIN/black --check {{ args }}
format *args=".": devenv
$BIN/ruff format --check {{ args }}


django-upgrade *args="$(find applications interactive jobserver redirects services staff tests -name '*.py' -type f)": devenv
Expand All @@ -164,7 +164,7 @@ ruff *args=".": devenv


# run the various dev checks but does not change any files
check: black django-upgrade ruff
check: format django-upgrade ruff


check-migrations: devenv
Expand All @@ -174,8 +174,8 @@ check-migrations: devenv

# fix formatting and import sort ordering
fix: devenv
$BIN/black .
$BIN/ruff check --fix .
$BIN/ruff format .


load-dev-data: devenv
Expand Down

0 comments on commit b456b01

Please sign in to comment.