fix(#100): auto-fix safe ruff violations (I001, UP007/035/042/047, F401 orphans) #125
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!125
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/100-ruff-autofixes"
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?
Resolves Mark/osint-hub#100 — auto-fix the safe subset of remaining ruff violations on top of
fix/97-plc0415-imports.Scope
Five rule families touched, each in a separate commit so any regression is bisectable:
77acfddb8103d30fe1ddf--unsafe-fixes, verified no isinstance/.value callersabd28ab--unsafe-fixes, verified callers do not introspect the type param0ee17f8--unsafe-fixes, alembic merge with empty bodyf724570f749c0bNet effect
CI lint command (
ruff check app/ --config ../pyproject.toml): 349 → 0 fixable rules remaining, all remaining errors are manual (PLC0415hoist: 204,F401registry/init: 103,PLR0917dataclass refactor: 42). None of the remaining ones are[*]-flagged.Canonical (
ruff check .): drops from 270 → 264 (the canonical-config oscillation noted in the I001 alembic commit creates +15 phantom I001s in app/services — pre-existing config quirk, not introduced here).Explicitly skipped (per task spec)
app/modules/registry.py— 76 F401 in the@ModuleRegistry.registerdecorator pattern (intentional side-effect imports, removing them breaks module registration).app/routers/__init__.py— 21 F401 (intentional re-exports).app/services/llm/__init__.py— 5 F401 (intentional re-exports).app/modules/ocr_extractor.py:188—pytesseractinside atry:at function scope; ruff refuses to auto-fix (soft-import heuristic).PLC0415(204),PLR0917(42),PT028(1) — manual refactor lane, not in scope here.Verification
ruff check .after each commit (--statistics confirmed rule-by-rule).ruff check app/ --config ../pyproject.toml(the CI lint command) — 349 errors, all manual.pytest tests/unit/ -m "not slow and not integration and not performance and not security"→ 928 passed, 1 skipped, 17 deselected (pre-existing flaky timeout intest_social_finder.py::test_gather_limits_platforms— confirmed same on baseline branchfix/97-plc0415-imports).isinstance/attribute usage at call sites; UP047 verified PEP 695 syntax parses under Python 3.12 (project'srequires-python = ">=3.12").Stack
Draft — please review the bisectable commits and let me know if any of the
--unsafe-fixesshould be split out or reverted.Pull request closed