[hermes] bstein_home: python:S2208 #643
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's python:S2208 flags because it pollutes the module namespace with an unenumerated set of names. Here the wildcard is load-bearing: the facade deliberately re-exports the state module's public names so callers and tests can patch them via sys.modules[name], so the fix must keep those names available on 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 wildcard import with a module import followed by an explicit re-export loop that copies the same set of names star-import would have bound (the module's all if defined, otherwise every public name). This satisfies S2208 by importing the module and using its members, while preserving the exact patch surface the facade docstring promises: every name that was previously injected into this module by the wildcard is still bound here, so sys.modules[name]-based dependency lookup and test patching keep working unchanged. If the set of names access_request_state exposes is small an... (truncated)
Links
/api/admin/audit/events, event typeshermes_autotriage_incidentandhermes_autotriage_diagnosis.Filed automatically by Ariadne from a Hermes Agent diagnosis (run run_d6dc58331b3b47e89cb2cab3d5848cc7). Hermes has no write access to this repository; no files or infrastructure were changed.