fix(#100): residual ruff violations (PLR0917 / F401 / PLC0415 / I001) — rebased onto current main #126
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!126
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/100-ruff-autofixes-rebased"
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?
Supersedes draft PR #125 (rebased onto current main).
Resolves Mark/osint-hub#100 — closes the residual manual-judgment ruff violations on top of the auto-fixable waves (PRs #111/#112/#113/#114 lineage and #125 partial).
Acceptance (card-spec gates)
Both gates exit 0 at ruff 0.16.7 (and 0.16.1, matching the unpinned
pip install ruffin ci.yml).Test results
The 18 failures are identical to baseline
git stashrun on the rebased branch (without my changes): pre-existingtest_module_metadatafailures across modules andtest_membership_requires_valid_*FK enforcement edge cases. Not introduced by this PR.What's new on top of #125
PR #125 was opened by the parent card from the pre-rebase branch (
fix/100-ruff-autofixes @ f749c0b, based onb81dc67). Since then main advanced to5ccbd61(the mypy Real-bug bucket merged via PR #124), which carries the bucket-merge per-file-ignores that were the dominant share of the residual noise. This PR is rebased onto current main (5ccbd61) and adds 3 new commits on top:Net delta vs main
ruff check .at ruff 0.16.7: 0 (was 84 pre-PR on rebased branch, 270+ at ruff 0.16.x vs pre-mypy main)ruff check app/ --config ../pyproject.toml: 0 (was 162 pre-PR, 349+ vs pre-mypy main)backend/app/...per-file-ignores so they match CI scope pathsapp/...)isort.known-first-party = ["app"]so CI invocation classifiesapp.*imports correctly)Per-commit rationale
bdcb7a1— per-file-ignores + path-glob alignmentbackend/app/...patterns with**/app/...so they match BOTHruff check .(pathsbackend/app/modules/registry.py) ANDruff check app/ --config ../pyproject.toml(pathsapp/modules/registry.py). This was the documented "config duality" issue — the previous fix-up lane (t_f207bd95) noted it but only fixed the isort side. Path-glob alignment is the cleaner fix.known-first-party = ["app"]— fixes the I001 in the CI invocation.b41dd82— real code fixesapp/main.py: hoisted redundantfrom typing import ...lines out ofconfigure_mappers()into a single top-levelfrom typing import Any, cast as typing_cast.app/routers/contacts.py: removed genuinely unusedcast(the file uses inline comment type-narrowing instead). 1 real F401 orphan introduced when main moved the typing import.0c83e23— ruff isort + format normalizationCumulative auto-fix over the 76 files affected by the two commits above. Two sub-changes:
isort.known-first-party = ["app"]is set, ruff correctly recognizesapp.*imports as first-party.Out-of-scope (pre-existing on main, not addressed)
ruff format --check app/ --config ../pyproject.tomlis RED on main (129 files would reformat) and remains RED on this branch (117 files would reformat, slightly improved because this PR reformatted the files it touched). The card-spec acceptance only covers the tworuff checkgates, not the format gate. The format-debt cleanup is a separate, much larger lane that needs its own PR.Branch info
fix/100-ruff-autofixes-rebased(new — supersedesfix/100-ruff-autofixesbecause the latter was based on pre-mypy-merge main)main @ 5ccbd610c83e23c5767357e02a251191188215c6eae4441Refs Mark/osint-hub#100