Skip to content

Commit

Permalink
refactor: ruff configuration (#417)
Browse files Browse the repository at this point in the history
  • Loading branch information
mkb79 authored Apr 19, 2024
1 parent d6e2040 commit d0c5b85
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 19 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ repos:
stages: [commit, push, manual]
- id: ruff
name: ruff
entry: ruff
entry: ruff check
language: system
types: [python]
require_serial: true
Expand Down
30 changes: 12 additions & 18 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,12 @@ warn_unreachable = true

[tool.ruff]
# missing rst-docstrings check, these should be adding through ruff
line-length = 80
src = ["src"]
target-version = "py310"
output-format = "grouped"

[tool.ruff.lint]
ignore = [
"D10", # temporarily ignore missing docstrings
"E501",
Expand All @@ -95,7 +101,6 @@ ignore = [
"PLR0915", # temporarily
"PLR2004", # temporarily
]
line-length = 80
select=[
"A",
"ASYNC",
Expand All @@ -116,23 +121,12 @@ select=[
"UP",
"W",
]
src = ["src"]
target-version = "py310"
output-format = "grouped"

[tool.ruff.per-file-ignores]
"tests/*" = ["S101"]

[tool.ruff.isort]
force-single-line = false
known-first-party = ["audible"]
lines-after-imports = 2

[tool.ruff.mccabe]
max-complexity = 21 # temporarily raise complexity, target is 10

[tool.ruff.pydocstyle]
convention = "google"
mccabe.max-complexity = 21 # temporarily raise complexity, target is 10
pydocstyle.convention = "google"
isort.force-single-line = false
isort.known-first-party = ["audible"]
isort.lines-after-imports = 2
per-file-ignores."tests/*" = ["S101"]

[build-system]
requires = ["poetry-core>=1.0.0"]
Expand Down

0 comments on commit d0c5b85

Please sign in to comment.