-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Expand file tree
/
Copy pathpyproject.toml
More file actions
32 lines (30 loc) · 1.64 KB
/
Copy pathpyproject.toml
File metadata and controls
32 lines (30 loc) · 1.64 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
[tool.ruff]
# This is a samples/tutorial repository. Some rules are relaxed to accommodate
# tutorial-style code patterns (e.g., env setup before imports).
line-length = 120
[tool.ruff.lint]
ignore = [
# E402: Module level import not at top of file — common in tutorial scripts
# that configure environment (os.environ, dotenv) before importing modules
"E402",
# E722: Bare except clause — acceptable in demo/sample scripts where broad
# exception handling improves readability for tutorial purposes
"E722",
# F401: Imported but unused — samples often import modules to show usage patterns
# or for optional features without using them in every code path
"F401",
# F811: Redefinition of unused variable — common in tutorial scripts that
# demonstrate multiple approaches or allow re-running cells independently
"F811",
# F841: Local variable assigned but never used — common in demos that assign
# results to named variables for clarity even when not subsequently used
"F841",
]
[tool.ruff.lint.per-file-ignores]
# BLE001 (blind except) became a default rule in ruff 0.16.8. In the
# bidirectional-streaming samples the broad handlers it flags are cleanup paths,
# background refresh loops and top-level handlers, where catching broadly is
# deliberate -- narrowing them would let a voice sample die on an unanticipated
# error instead of logging it and carrying on. Same rationale as the E722 entry
# above, scoped to this directory rather than applied repo-wide.
"01-features/02-host-your-agent/01-runtime/03-advanced/03-bidirectional-streaming/**/*.py" = ["BLE001"]