[hermes] bstein_home: python:S2208 #595
Loading…
x
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
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?
SonarQube reports python:S2208 in
backend/atlas_portal/routes/access_requests.py. The build is green; this is a standing finding, not a failure.What is wrong
Line 8 uses a wildcard import (
from .access_request_state import *), which SonarQube flags because it obscures which names enter the module namespace and can silently shadow other imports. The facade relies on those names being attributes of this module (tests patch them here andregister()passessys.modules[__name__]as the dependency object), so the fix must keep the same module-level surface without the star import.Ariadne opened no pull request for it: no automated patch was possible for this finding.
Facts
backend/atlas_portal/routes/access_requests.py:8)Suggested fix (not applied)
Hermes could not open a pull request for this, so the change below was not written, validated, or pushed anywhere. It is a starting point for whoever picks this up, not a reviewed patch.
backend/atlas_portal/routes/access_requests.py— Replace the wildcard import with a plain module import ofaccess_request_state, then explicitly copy its public surface (honouring__all__when defined, otherwise all non-underscore names, which is exactly whatimport *did) into this module's globals. This removes the S2208 violation and the now-unneedednoqa: F403while preserving the existing patch surface byte-for-byte: every name that was previously star-imported is still a real attribute ofaccess_requests, so monkeypatching and thedeps = sys.modules[__name__]lookup behave identically. If the maintainer knows the exact set... (truncated)
Links
/api/admin/audit/events, event typeshermes_autotriage_incidentandhermes_autotriage_diagnosis.Filed automatically by Ariadne from a Hermes Agent diagnosis (run run_5f30e5b2c65040c9968c3a13735ecffc). Hermes has no write access to this repository; no files or infrastructure were changed.