Skip to content

Commit 665873d

Browse files
chore: refine just commands
1 parent 22c3937 commit 665873d

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,9 @@ repos:
1313
hooks:
1414
- id: ruff
1515
name: ruff (linter)
16-
entry: just ruff
16+
entry: just ruff-fix
1717
language: system
1818
types: [python]
19-
args: [--fix]
2019
- id: black
2120
name: black
2221
entry: just black

justfile

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ ruff:
2424

2525
ruff-show-violations:
2626
@echo "🚀 Linting the project with Ruff and show violations"
27-
@poetry run ruff check --show-source --show-fixes src tests
27+
@poetry run ruff check --show-source src tests
2828

2929
ruff-fix:
3030
@echo "🚀 Linting the project with Ruff and autofix violations (where possible)"
@@ -35,10 +35,14 @@ black:
3535
@poetry run black src tests
3636

3737
black-check:
38+
@echo "🚀 Listing files Black would reformat"
39+
@poetry run black --check src tests
40+
41+
black-diff:
3842
@echo "🚀 Checking formatting advices from Black"
39-
@poetry run black --check --diff src tests
43+
@poetry run black --diff src tests
4044

41-
lint-and-format: ruff black
45+
lint-and-format: ruff-fix black
4246

4347
test:
4448
@echo "🚀 Testing code with pytest"

0 commit comments

Comments
 (0)