Skip to content

Commit

Permalink
Updated ruff and pre-commit config for the project.
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverandrich committed Oct 1, 2024
1 parent b872f75 commit 1607872
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
6 changes: 1 addition & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,11 @@ repos:
- id: check-symlinks
- id: check-json

- repo: https://github.com/psf/black
rev: 24.8.0
hooks:
- id: black

- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: "v0.6.8"
hooks:
- id: ruff
- id: ruff-format

- repo: https://github.com/RobertCraigie/pyright-python
rev: v1.1.382.post0
Expand Down
16 changes: 11 additions & 5 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,11 @@ ignore = ["./tests/**/*"]
[tool.ruff]
target-version = "py38"
line-length = 100

[tool.ruff.format]
exclude = ["**/migrations/*"]

[tool.ruff.lint]
select = [
"A", # flake8-builtins
"ARG", # flake8-unused-arguments
Expand Down Expand Up @@ -114,15 +119,16 @@ unfixable = [
"F841",
]

[tool.ruff.isort]
known-first-party = ["django_tailwind_cli"]
[tool.ruff.lint.isort]
known-first-party = ["solomon"]

[tool.ruff.flake8-tidy-imports]
[tool.ruff.lint.flake8-tidy-imports]
ban-relative-imports = "all"

[tool.ruff.per-file-ignores]
"tests/**/*" = ["PLR2004", "S101", "TID252"]
[tool.ruff.lint.per-file-ignores]
"tests/**/*" = ["PLR2004", "S101", "TID252", "ARG001"]
"tests/snapshots/*" = ["ALL"]
"**/migrations/*" = ["ALL"]

# Pytest
[tool.pytest.ini_options]
Expand Down

0 comments on commit 1607872

Please sign in to comment.