ruff (fast linter): - Configured in pyproject.toml with focused rules: F, E, W, B, SIM, RUF - Ignores style nags (E501, SIM103, SIM115) and Textual patterns (B008, RUF012) - Auto-fixable rules enabled - Current: 953 issues (347 auto-fixable) pyright (static type checker): - Configured in pyrightconfig.json with standard mode - Suppresses noisy optional-member-access warnings - Catches real bugs: undefined variables, type mismatches, missing attributes - Current: 70 errors, 237 warnings Key findings from first run: - 66 unused imports (F401) — auto-fixable - 5 undefined names (F821) — actual bugs - 70 type errors from pyright — None passed where str expected - 2 undefined variables in warm_router.py Research: /research/quality-tools/findings.md 65/65 canary passing
36 lines
1.1 KiB
TOML
36 lines
1.1 KiB
TOML
# Ruff — fast Python linter + formatter
|
|
# Focus on catching real bugs, not style nags
|
|
# Run: ruff check src/rune/ --fix
|
|
|
|
[tool.ruff.lint]
|
|
# Rules that catch real bugs
|
|
select = [
|
|
"F", # pyflakes (unused imports, undefined names, unreachable code)
|
|
"E", # pycodestyle errors (syntax issues)
|
|
"W", # pycodestyle warnings
|
|
"B", # flake8-bugbear (common bugs)
|
|
"SIM", # flake8-simplify
|
|
"RUF", # ruff-specific rules
|
|
]
|
|
|
|
# Don't flag style issues or missing annotations (pyright handles)
|
|
ignore = [
|
|
"E501", # line too long
|
|
"B008", # function call in default argument (Textual pattern)
|
|
"SIM108", # ternary operator preference
|
|
"RUF012", # mutable class attributes (Textual uses these)
|
|
"SIM103", # needless bool (readability)
|
|
"SIM115", # open-file-with-context-handler (not always applicable)
|
|
]
|
|
|
|
# Auto-fixable rules
|
|
fixable = ["F", "E", "W", "B", "SIM", "RUF"]
|
|
|
|
[tool.ruff.lint.per-file-ignores]
|
|
"**/test_*.py" = ["B", "SIM"]
|
|
"**/skills/**/*.py" = ["E501"]
|
|
|
|
[tool.ruff.format]
|
|
quote-style = "double"
|
|
indent-style = "space"
|