Skip to content

Commit

Permalink
Merge pull request #12 from AlessandroMiola/refine_just_commands
Browse files Browse the repository at this point in the history
chore: refine just commands
  • Loading branch information
AlessandroMiola authored Feb 10, 2024
2 parents 22c3937 + 665873d commit 5286155
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
3 changes: 1 addition & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,9 @@ repos:
hooks:
- id: ruff
name: ruff (linter)
entry: just ruff
entry: just ruff-fix
language: system
types: [python]
args: [--fix]
- id: black
name: black
entry: just black
Expand Down
10 changes: 7 additions & 3 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ ruff:

ruff-show-violations:
@echo "πŸš€ Linting the project with Ruff and show violations"
@poetry run ruff check --show-source --show-fixes src tests
@poetry run ruff check --show-source src tests

ruff-fix:
@echo "πŸš€ Linting the project with Ruff and autofix violations (where possible)"
Expand All @@ -35,10 +35,14 @@ black:
@poetry run black src tests

black-check:
@echo "πŸš€ Listing files Black would reformat"
@poetry run black --check src tests

black-diff:
@echo "πŸš€ Checking formatting advices from Black"
@poetry run black --check --diff src tests
@poetry run black --diff src tests

lint-and-format: ruff black
lint-and-format: ruff-fix black

test:
@echo "πŸš€ Testing code with pytest"
Expand Down

0 comments on commit 5286155

Please sign in to comment.