Skip to content

Commit

Permalink
Update Ruff config
Browse files Browse the repository at this point in the history
  • Loading branch information
hugovk committed Feb 8, 2024
1 parent a629386 commit 7cfa397
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ repos:
rev: v0.2.1
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
args: [--exit-non-zero-on-fix]

- repo: https://github.com/psf/black-pre-commit-mirror
rev: 24.1.1
Expand Down
11 changes: 7 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -63,20 +63,23 @@ artifacts = [
local_scheme = "no-local-version"

[tool.ruff]
line-length = 88
fix = true

[tool.ruff.lint]
select = [
"C4", # flake8-comprehensions
"D", # pydocstyle
"E", # pycodestyle errors
"EM", # flake8-errmsg
"F", # pyflakes errors
"I", # isort
"ISC", # flake8-implicit-str-concat
"LOG", # flake8-logging
"PGH", # pygrep-hooks
"RUF100", # unused noqa (yesqa)
"UP", # pyupgrade
"W", # pycodestyle warnings
"YTT", # flake8-2020
# "LOG", # TODO: enable flake8-logging when it's not in preview anymore
]
extend-ignore = [
"E203", # Whitespace before ':'
Expand All @@ -85,9 +88,9 @@ extend-ignore = [
"E241", # Multiple spaces after ','
]

[tool.ruff.isort]
required-imports = ["from __future__ import annotations"]
[tool.ruff.lint.isort]
known-first-party = ["humanize"]
required-imports = ["from __future__ import annotations"]

[tool.ruff.pydocstyle]
convention = "google"
Expand Down

0 comments on commit 7cfa397

Please sign in to comment.