[hermes] bstein_home: python:S2208 #605
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 Sonar flags because it obscures which names enter the module namespace and can silently shadow other imports. The wildcard is deliberate here: the facade re-exports access_request_state's names onto this module sosys.modules[__name__]keeps working as a monkeypatch surface, so the fix must keep every public name of access_request_state available as an attribute of this module.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 star import with a normal module import plus an explicit programmatic re-export of the same namesimport *would bind (honouring__all__when defined, otherwise all non-underscore names). This removes the wildcard syntax S2208 objects to while preserving the exact patch surface: every name access_request_state exports is still a real attribute of this module, sodeps = sys.modules[__name__]and any test monkeypatching are unaffected. The# noqa: F403comment is dropped because there is no longer a wildcard for flake8 to flag. If the export list of access_request_state is sm... (truncated)
Links
/api/admin/audit/events, event typeshermes_autotriage_incidentandhermes_autotriage_diagnosis.Filed automatically by Ariadne from a Hermes Agent diagnosis (run run_923703acce2f431fa002fa8f77abc44a). Hermes has no write access to this repository; no files or infrastructure were changed.