WIP: linter setup
This commit is contained in:
parent
2a3538ac9e
commit
a9fec56176
5 changed files with 274 additions and 0 deletions
|
@ -10,6 +10,56 @@ dependencies = [
|
|||
"cachetools>=5.0.0",
|
||||
]
|
||||
|
||||
|
||||
[tool.ruff]
|
||||
target-version = "py313"
|
||||
line-length = 88
|
||||
indent-width = 4
|
||||
|
||||
[tool.ruff.lint]
|
||||
# Enable pycodestyle (E, W), Pyflakes (F), isort (I), and other useful rules
|
||||
select = [
|
||||
"E", # pycodestyle errors
|
||||
"W", # pycodestyle warnings
|
||||
"F", # Pyflakes
|
||||
"I", # isort
|
||||
"N", # pep8-naming
|
||||
"UP", # pyupgrade
|
||||
"B", # flake8-bugbear
|
||||
"C4", # flake8-comprehensions
|
||||
"SIM", # flake8-simplify
|
||||
"TCH", # flake8-type-checking
|
||||
"RUF", # Ruff-specific rules
|
||||
]
|
||||
|
||||
# Ignore specific rules if needed
|
||||
ignore = [
|
||||
"E501", # Line too long (handled by formatter)
|
||||
"B008", # Do not perform function calls in argument defaults
|
||||
]
|
||||
|
||||
# Allow unused variables when they start with an underscore
|
||||
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
|
||||
|
||||
[tool.ruff.format]
|
||||
# Use double quotes for strings
|
||||
quote-style = "double"
|
||||
# Indent with spaces
|
||||
indent-style = "space"
|
||||
# Respect magic trailing commas
|
||||
skip-magic-trailing-comma = false
|
||||
# Auto-detect line endings
|
||||
line-ending = "auto"
|
||||
|
||||
[tool.ruff.lint.isort]
|
||||
known-first-party = ["trmnl-report"]
|
||||
|
||||
[tool.pyright]
|
||||
venvPath = "."
|
||||
venv = ".venv"
|
||||
|
||||
[dependency-groups]
|
||||
dev = [
|
||||
"pre-commit>=4.3.0",
|
||||
"ruff>=0.12.11",
|
||||
]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue