You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Lint: silence B008 false positives for typer.Option / FastAPI Depends via ruff config #166
Problem: ruff flags 18 B008 (function call in a default argument): 16 in src/secfoo/cli.py, 2 in src/secfoo/web/routes/assessments.py. These are false positives. typer.Option(...), typer.Argument(...) and FastAPI's Depends(...)/Query(...) are meant to be used as defaults.
Build: tell ruff these calls are safe, without rewriting every signature:
Put this in the existing ruff config, and list only the calls that actually trigger the rule. If a flagged call is really mutable (such as a list or dict default), fix that one in code instead.
Where to look: the ruff config (pyproject.toml or ruff.toml), src/secfoo/cli.py, src/secfoo/web/routes/assessments.py.
Done when:ruff check . --select B008 is clean, no # noqa comments were added, and pytest tests passes.
Activity