-
Notifications
You must be signed in to change notification settings - Fork 15
Expand file tree
/
Copy pathruff.toml
More file actions
30 lines (25 loc) · 1.61 KB
/
ruff.toml
File metadata and controls
30 lines (25 loc) · 1.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# ═══════════════════════════════════════════════════════════
# Tofu (豆腐) — Ruff Linter Configuration
# ═══════════════════════════════════════════════════════════
#
# This config is used by both local development and CI.
# CI step: ruff check lib/ routes/ tests/
#
# ═══════════════════════════════════════════════════════════
target-version = "py310"
[lint]
# Default rule set: pyflakes (F) + pycodestyle errors (E)
select = ["F", "E"]
ignore = [
# ── Style choices (deliberate, not bugs) ──────────────
"E501", # Line too long — enforced by code review, not linter
"E701", # Multiple statements on one line (colon) — compact if/elif chains
"E702", # Multiple statements on one line (semicolon) — compact one-liners
"E731", # Lambda assignment — used for closures with captured variables
"E741", # Ambiguous variable name (l, O, I) — common in list comprehensions
# ── Structural patterns (by design) ───────────────────
"E402", # Module-level import not at top — __init__.py lazy imports, sys.path in tests
]
[lint.per-file-ignores]
# Test files often manipulate sys.path before imports and use unused locals for mocking
"tests/*" = ["F401", "F841"]