Skip to content

Commit

Permalink
test(pre-commit): ✅ add ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
miragecentury committed Aug 20, 2024
1 parent 722a1c9 commit ab54926
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
7 changes: 7 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,13 @@ repos:
types: [python]
pass_filenames: false
always_run: true
- id: ruff
name: ruff
language: system
entry: "./.venv/bin/ruff"
types: [python]
pass_filenames: false
args: ["check", "src", "tests", "--fix"]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
Expand Down
18 changes: 18 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ pyupgrade = "^3.15.2"
pytest = "^8.2.0"
pytest-xdist = "^3.6.1"
pytest-cov = "^5.0.0"
ruff = "^0.6.1"

[tool.poetry.extras]

Expand Down Expand Up @@ -77,3 +78,20 @@ disallow_untyped_defs = true
init_forbid_extra = true
init_typed = true
warn_required_dynamic_aliases = true

[tool.ruff]
# Same as Black.
line-length = 88
indent-width = 4

[tool.ruff.lint]
select = ["D","F","E","W","I","UP","PL","N","RUF"]

[tool.ruff.format]
quote-style = "double"
indent-style = "space"
docstring-code-format = true
docstring-code-line-length = 88

[tool.ruff.lint.pydocstyle]
convention = "google"

0 comments on commit ab54926

Please sign in to comment.