Enabled all Ruff linter rules and fixed resulting violations.
This commit is contained in:
+8
-48
@@ -59,61 +59,21 @@ target-version = "py314"
|
||||
extend-exclude = ["crabstero/_version.py"] # auto-generated by hatch-vcs
|
||||
|
||||
[tool.ruff.lint]
|
||||
select = [
|
||||
# Core
|
||||
"F", # Pyflakes
|
||||
"E", # pycodestyle errors
|
||||
"W", # pycodestyle warnings
|
||||
"N", # pep8-naming
|
||||
"D", # pydocstyle
|
||||
"I", # isort
|
||||
"ICN", # flake8-import-conventions
|
||||
|
||||
# Correctness & bugs
|
||||
"B", # flake8-bugbear
|
||||
"ASYNC", # flake8-async
|
||||
"DTZ", # flake8-datetimez
|
||||
"RSE", # flake8-raise
|
||||
"RET", # flake8-return
|
||||
"A", # flake8-builtins
|
||||
"PIE", # flake8-pie
|
||||
|
||||
# Modernization & simplification
|
||||
"UP", # pyupgrade
|
||||
"SIM", # flake8-simplify
|
||||
"C4", # flake8-comprehensions
|
||||
"FLY", # flynt (f-string conversion)
|
||||
"PTH", # flake8-use-pathlib
|
||||
|
||||
# Performance
|
||||
"PERF", # Perflint
|
||||
|
||||
# Security
|
||||
"S", # flake8-bandit
|
||||
|
||||
# Code hygiene
|
||||
"T10", # flake8-debugger
|
||||
"T20", # flake8-print
|
||||
"ERA", # eradicate
|
||||
"PGH", # pygrep-hooks
|
||||
"TC", # flake8-type-checking
|
||||
|
||||
# Testing
|
||||
"PT", # flake8-pytest-style
|
||||
|
||||
# Ruff-specific
|
||||
"RUF", # Ruff-specific rules
|
||||
]
|
||||
select = ["ALL"]
|
||||
ignore = [
|
||||
"D203", # incompatible with D211 (no blank line before class docstring)
|
||||
"D213", # incompatible with D212 (summary on first line)
|
||||
"COM812", # handled by the formatter
|
||||
"D203", # incompatible with D211 (no blank line before class docstring)
|
||||
"D213", # incompatible with D212 (summary on first line)
|
||||
]
|
||||
|
||||
[tool.pytest.ini_options]
|
||||
asyncio_mode = "auto"
|
||||
|
||||
[tool.ruff.lint.per-file-ignores]
|
||||
"tests/**" = ["S101"] # assert is standard for pytest
|
||||
"tests/**" = [
|
||||
"S101", # assert is standard for pytest
|
||||
"SLF001", # tests legitimately access private members for verification
|
||||
]
|
||||
|
||||
[tool.coverage.run]
|
||||
source = ["crabstero"]
|
||||
|
||||
Reference in New Issue
Block a user