Skip to content

Commit

Permalink
ci: add ruff
Browse files Browse the repository at this point in the history
Signed-off-by: Matej Focko <[email protected]>
  • Loading branch information
mfocko committed Oct 12, 2023
1 parent 4c759b5 commit 00a7140
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 63,9 @@ repos:
- id: requre-purge
# Do not run in pre-commit.ci as it requires too much time
stages: [manual, push]
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.0.291
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
27 changes: 27 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -65,3 65,30 @@ source = "vcs"
# - post-release (no-guess-dev):
# 0.20.0.post1.dev1 g0abcdef < 0.20.1
raw-options.version_scheme = "no-guess-dev"

[tool.ruff]
select = [
# "B", # flake8-bugbear
# "C4", # flake8-comprehensions
# "COM", # flake8-commas
# "E", # pycodestyle Error
# "F", # Pyflakes
# "I", # isort
# "PERF",# Perflint
# "PIE", # flake8-pie
# "PT", # flake8-pytest-style, would be nice to enable
# "RET", # flake8-return
# "RUF", # Ruff-specific rules
# "SIM", # flake8-simplify
# "UP", # pyupgrade
# "W", # pycodestyle Warning
]

ignore = [
"B017", # assert-raises-exception
"B022", # useless-contextlib-suppress
"RUF003"# Comment contains ambiguous character
]

line-length = 100
target-version = "py39"

0 comments on commit 00a7140

Please sign in to comment.