fix(lint): clear SIM/C/PLR/PLW/RUF bucket debt in backend/ (issue #100) #114
No reviewers
Labels
No labels
agentic-osint
audit
blocked:commit-ready-failed
blocked:gate-fetch
blocked:gate-fetch
blocked:gate-lint
blocked:gate-plan
blocked:gate-research
blocked:needs-decision
blocked:needs-human
blocked:no-changes
blocked:preflight
blocked:verify-failed
bug
chore
deferred
enhancement
feature-request
in-progress
lint-baseline
lint-cleanup
needs-decompose
needs-triage
performance
quickfix
security/medium
triage-approved
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Mark/osint-hub!114
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/100-ruff-sim-plr"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Clears the SIM/C/PLR/PLW/RUF/ISC/COM/PIE/RET/PERF bucket for issue #100, parallel to the imports (PR #112), style (PR #113), and security (PR #111) sibling PRs.
Acceptance gate:
cd backend && ruff check . --select SIM,UP,PIE,RET,PERF,RUF,ISC,COM,C,PLR,PLW,Bexits 0 at CI-pinned ruff 0.15.17.Tests: 935 unit tests pass (regression-isolated subset per project pytest config).
Changes
Real fixes (apply on disk)
ClassVar[T]annotation to class-body mutable defaults —EvidenceModulesubclasses, registries (PlaybookRegistry._hooks,ModuleRegistry._modules,PipelineRegistry._dags),EvidenceModule.requires_config,state_machine.STATES, etc.[a] + b + cwith[a, *b, *c]in orchestrator, orchestrator_enhanced, orchestrator_v3_llm.ifs into a singleandin email_osint, osint_playbook, search_aggregator, whois, scripts/scraper_poc.Per-file-ignores in pyproject.toml (systemic patterns)
Depends()in arg defaults is the FastAPI pattern, intentional.Inline noqa (5 sites, with rationale)
deps.py,routers/contacts.py,routers/queue_api.py: nested-if needed socase_id: int | Nonenarrows tointfor the type checker (pyright/mypy don't narrow throughand).pipeline/patterns.py: split-once kept for readability of subdomain-count vs label-length branches.tests/test_osint_workflow_e2e.py: pytest class-level mutable state containers that are reassigned in test methods;ClassVarwould break the tests.Out of scope (left for siblings or future work)
Verification
Refs #100
Pull request closed