Fix #97: hoist PLC0415 imports to top-level #99

Closed
Mark wants to merge 1 commit from fix/97-plc0415-imports into main
Owner

Closes #97

Hoists inline PLC0415 imports to top-level in the four files flagged by ruff:

  • backend/app/change_detector.py — json
  • backend/app/main.py — logging, time
  • backend/app/modules/abuseipdb.py — settings
  • backend/app/modules/dark_web_monitor.py — aiohttp.socks (try/except guard, _has_socks unchanged)

Validation:

  • No circular import: fresh-interpreter import of app.main, app.change_detector, app.modules.abuseipdb, app.modules.dark_web_monitor all succeed; no module imports app.main in reverse.
  • ruff check on all four touched files: All checks passed (exit 0).
  • Full repo ruff check .: 270 errors on this branch vs 275 at base b81dc67 — zero new errors, exactly the 5 targeted PLC0415s removed (repo baseline is pre-existing dirty; CI lint job also reduces 373 → 368 in backend/app).
  • Test suite: 1297 passed, 5 skipped, 0 failed (pytest -m "not integration and not performance and not security").
Closes #97 Hoists inline PLC0415 imports to top-level in the four files flagged by ruff: - `backend/app/change_detector.py` — `json` - `backend/app/main.py` — `logging`, `time` - `backend/app/modules/abuseipdb.py` — `settings` - `backend/app/modules/dark_web_monitor.py` — `aiohttp.socks` (try/except guard, `_has_socks` unchanged) Validation: - No circular import: fresh-interpreter import of `app.main`, `app.change_detector`, `app.modules.abuseipdb`, `app.modules.dark_web_monitor` all succeed; no module imports `app.main` in reverse. - `ruff check` on all four touched files: All checks passed (exit 0). - Full repo `ruff check .`: 270 errors on this branch vs 275 at base b81dc67 — zero new errors, exactly the 5 targeted PLC0415s removed (repo baseline is pre-existing dirty; CI lint job also reduces 373 → 368 in backend/app). - Test suite: 1297 passed, 5 skipped, 0 failed (pytest -m "not integration and not performance and not security").
Fix #97: hoist PLC0415 imports to top-level
Some checks failed
CI / Backend Lint & Format (pull_request) Failing after 4s
CI / Golden Fixture Validation (pull_request) Has been skipped
CI / Backend Tests (pull_request) Has been skipped
CI / Backend Security Tests (pull_request) Has been skipped
CI / Frontend Lint (pull_request) Failing after 22s
CI / Frontend Tests (pull_request) Has been skipped
CI / Dependency Security Scan (pull_request) Has been skipped
Stress Tests / Stress & Pipeline Tests (pull_request) Failing after 6s
Stress Tests / Full Data Pipeline Validation (pull_request) Has been skipped
Performance Regression Tests / Performance Regression Detection (pull_request) Failing after 33s
CI / Frontend E2E Tests (pull_request) Has been skipped
Performance Regression Tests / Compare with Baseline (pull_request) Has been skipped
CI / All Checks Passed (pull_request) Failing after 51s
40efd97a0f
Mark closed this pull request 2026-08-26 05:09:26 +00:00
Some checks failed
CI / Backend Lint & Format (pull_request) Failing after 4s
CI / Golden Fixture Validation (pull_request) Has been skipped
CI / Backend Tests (pull_request) Has been skipped
CI / Backend Security Tests (pull_request) Has been skipped
CI / Frontend Lint (pull_request) Failing after 22s
CI / Frontend Tests (pull_request) Has been skipped
CI / Dependency Security Scan (pull_request) Has been skipped
Stress Tests / Stress & Pipeline Tests (pull_request) Failing after 6s
Stress Tests / Full Data Pipeline Validation (pull_request) Has been skipped
Performance Regression Tests / Performance Regression Detection (pull_request) Failing after 33s
CI / Frontend E2E Tests (pull_request) Has been skipped
Performance Regression Tests / Compare with Baseline (pull_request) Has been skipped
CI / All Checks Passed (pull_request) Failing after 51s

Pull request closed

Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Mark/osint-hub!99
No description provided.