[hermes] atlasbot: python:S1871 #126
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:S1871 in
atlasbot/matrix/bot.py. The build is green; this is a standing finding, not a failure.What is wrong
In the heartbeat() coroutine's inner loop, the if/elif pair both assign
should_send = Truewith no other differing behavior, so the two branches are functionally identical and should be merged into a single condition per the S1871 rule.Ariadne opened no pull request for it: no automated patch was possible for this finding.
Facts
atlasbot/matrix/bot.py:170)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.
atlasbot/matrix/bot.py— Theif snippet and snippet != last_note:andelif now - last_sent >= max(60.0, self._settings.thinking_interval_sec * 2):branches both only executeshould_send = True, so they are identical branches per S1871. Combining the two conditions withorinto a single if preserves the exact same evaluation order and short-circuiting behavior while eliminating the duplicate branch.Links
/api/admin/audit/events, event typeshermes_autotriage_incidentandhermes_autotriage_diagnosis.Filed automatically by Ariadne from a Hermes Agent diagnosis (run run_5888914dd0f249fa9c8cb7ef61cdcd12). Hermes has no write access to this repository; no files or infrastructure were changed.