Skip to content

Commit

Permalink
Start enforcing ruff rules
Browse files Browse the repository at this point in the history
  • Loading branch information
DimitriPapadopoulos committed Jan 26, 2025
1 parent 9f181fb commit ae16c66
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,29 @@ requires = [
"cython"
]
build-backend = "setuptools.build_meta"

[tool.ruff]
target-version = "py38"

[tool.ruff.lint]
extend-select = [
"UP", # pyupgrade
"C4", # flake8-comprehensions
"PIE", # flake8-pie
"FLY", # flynt
"PERF", # Perflint
"RUF",
]
ignore = [
"F841", # Local variable is assigned to but never used
"UP031", # Use format specifiers instead of percent format
"UP032", # Use f-string instead of `format` call
"PERF203", # `try`-`except` within a loop incurs performance overhead
"RUF003",
"RUF005", # Consider iterable unpacking instead of concatenation
"RUF012", # Mutable class attributes should be annotated with `typing.ClassVar`
"RUF100", # Unused `noqa` directive
]

[tool.ruff.lint.extend-per-file-ignores]
"**/__init__.py" = ["F401"] # imported but unused

0 comments on commit ae16c66

Please sign in to comment.