-
Notifications
You must be signed in to change notification settings - Fork 79
Expand file tree
/
Copy pathruff.toml
More file actions
45 lines (41 loc) · 1.51 KB
/
ruff.toml
File metadata and controls
45 lines (41 loc) · 1.51 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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
target-version = "py310"
line-length = 120
[lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"UP", # pyupgrade
"B", # flake8-bugbear
"SIM", # flake8-simplify
"RUF", # ruff-specific
]
ignore = [
"E402", # module-level import not at top (lazy imports are intentional)
"E501", # line too long (handled by formatter)
"E741", # ambiguous variable name (l, I — context-dependent)
"B008", # function call in default argument (FastAPI Depends)
"B027", # empty method in abstract class without @abstract (intentional stubs)
"B904", # raise without from in except (too noisy)
"SIM102", # nested if → single if (readability)
"SIM105", # contextlib.suppress instead of try/except/pass (readability)
"SIM108", # ternary instead of if-else (readability)
"SIM115", # context manager for open (not always applicable)
"RUF001", # ambiguous unicode in string (Chinese text is intentional)
"RUF002", # ambiguous unicode in docstring
"RUF003", # ambiguous unicode in comment
"RUF012", # mutable class variable (dataclass fields)
"RUF043", # pattern metacharacters (intentional regex)
"UP007", # use X | Y for union (keep Optional for clarity)
]
[lint.per-file-ignores]
"tests/*" = ["B", "SIM"]
"scripts/*" = ["B", "SIM"]
[lint.isort]
known-first-party = [
"api", "answering", "benchmark", "config", "embedder",
"graph", "ingestion", "parser", "persistence", "retrieval",
]
[format]
quote-style = "double"