[hermes] atlasbot: python:S1871 #127
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 MatrixBot._answer_with_heartbeat's heartbeat() coroutine, the if/elif at lines 167-170 both execute the identical statement
should_send = True, so the two-branch conditional is equivalent to a single combined condition and the duplication is misleading/redundant.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— Collapse the two branches that both set should_send = True into a single condition usingor, preserving the exact same truth table (should_send becomes True if the snippet changed or the resend interval elapsed) while eliminating the duplicate branch body.Links
/api/admin/audit/events, event typeshermes_autotriage_incidentandhermes_autotriage_diagnosis.Filed automatically by Ariadne from a Hermes Agent diagnosis (run run_ea0c4e66747e4998b8494a23cd6e7432). Hermes has no write access to this repository; no files or infrastructure were changed.