-
Notifications
You must be signed in to change notification settings - Fork 729
Expand file tree
/
Copy pathruff.toml
More file actions
57 lines (47 loc) · 1.7 KB
/
ruff.toml
File metadata and controls
57 lines (47 loc) · 1.7 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
46
47
48
49
50
51
52
53
54
55
56
# Ruff configuration
# https://docs.astral.sh/ruff/configuration/
target-version = "py313"
line-length = 100
# Exclude vendored dependencies in Lambda code and build artifacts
exclude = [
"**/certifi*",
"**/charset_normalizer*",
"**/idna*",
"**/requests*",
"**/urllib3*",
"**/bin",
"**/cdk.out/**",
"pytest.ini",
]
[lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # Pyflakes (includes unused imports, variables)
"I", # isort
"B", # flake8-bugbear
"C4", # flake8-comprehensions
"UP", # pyupgrade
"ARG", # flake8-unused-arguments
"SIM", # flake8-simplify
]
ignore = [
"E501", # line too long (handled by formatter)
"B008", # do not perform function calls in argument defaults
"B905", # zip without explicit strict parameter
"SIM108", # use ternary operator instead of if-else
]
# Per-file ignores for legitimate patterns
[lint.per-file-ignores]
# Tests: pytest fixtures/parameters often appear unused — keep ignoring those.
# F401 is enforced so unused imports surface in lint (and CI) like in app/.
"tests/**/*.py" = ["ARG001", "E402"]
# Pydantic models have fields that appear unused but are accessed dynamically
"app/ingest.py" = ["ARG002"]
# Dataclass fields from external APIs may not all be used
"app/tracer/client.py" = ["ARG002"]
# CLI entry points
"app/cli/__main__.py" = ["ARG001"]
# stderr buffer outlives the function — closed in a watcher thread's `finally`,
# so a `with` block at the call site would close it before the subprocess runs.
"app/cli/interactive_shell/routing/handle_message_with_agent/orchestration/action_executor/synthetic_tasks.py" = ["SIM115"]