-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathruff.toml
More file actions
86 lines (79 loc) · 3.04 KB
/
Copy pathruff.toml
File metadata and controls
86 lines (79 loc) · 3.04 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
exclude = [
".ai/",
".github/",
".git/",
".idea/",
"__pycache__",
"*.egg-info",
".mypy_cache",
".pytest_cache",
".tox",
".venv",
"venv",
"build",
"dist",
"docs_with_docusarus",
"docs",
# AAASM-4915: vendored, verbatim quick-start excerpts (copied from
# ai-agent-assembly/examples; regenerated into docs/quick-start.md by the
# quickstart-tabs-check). Several are partial governance slices that are
# valid as doc excerpts but not standalone modules, so ruff can't lint or
# format them. The former black/isort/autoflake trio excluded this dir via
# the .pre-commit top-level `exclude`; keep that parity now that ruff is the
# single formatter/linter so the bare-CLI gates stay clean and the vendored
# copies are never rewritten.
"quickstart_snippets/",
# AAASM-4434: generated gRPC/protobuf stubs (scripts/gen_proto.py), committed
# verbatim; a CI drift check regenerates them and asserts no diff, so they
# must not be hand-edited to satisfy lint (mirrors the mypy.ini ignore for the
# same directory). The ruff 0.15 bump newly flags unused-argument findings in
# the generated grpc servicer stubs.
"agent_assembly/proto/",
]
line-length = 120
indent-width = 4
target-version = "py312"
[lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"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
"C901", # too complex
"ARG001", # unused function argument
]
[lint.per-file-ignores]
"__init__.py" = ["F401"]
# AAASM-4434: ARG002/ARG005 (unused method/lambda argument) are the same category
# already ignored repo-wide for plain functions as ARG001 — mock/callback test
# doubles routinely accept an argument only to match the interface they stand in
# for (monkeypatched hooks, callback signatures, fixture-injected params). The
# ruff 0.15 bump is what newly enabled these two rule IDs; scope the exception to
# test/ (unlike ARG001) so a genuinely-unused argument in production code under
# agent_assembly/ still gets flagged.
"test/**/*.py" = ["S101", "ARG002", "ARG005"]
[lint.isort]
known-first-party = ["agent_assembly"]
# AAASM-4434: the pre-commit `isort` hook (real isort, --profile=black) ships a
# bundled stdlib module list that includes CPython's own `test` package (Lib/
# test/), so it always classifies this repo's top-level `test.*` imports
# (e.g. `from test.bench.conftest import ...`) as standard-library. Ruff's isort
# implementation does not, so without this the two tools disagreed on where
# `test.*` imports belong and repeatedly re-sorted each other's output.
extra-standard-library = ["test"]
[format]
quote-style = "double"
indent-style = "space"
skip-magic-trailing-comma = false
line-ending = "auto"
[lint.pydocstyle]
convention = "google"