[hermes] atlasbot: python:S1871 #143
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 inside MatrixBot._answer_with_heartbeat, the if branch on line 168 and the elif branch on line 170 both execute the identical body
should_send = True. SonarQube python:S1871 flags duplicated branch implementations because the split conditions add no behavioural difference and obscure the intent; the two conditions should be merged into one expression.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— Both branches of the if/elif set should_send = True, so the conditional chain is redundant. Merging the two conditions withorinto a single boolean assignment removes the duplicate branch while keeping the exact same truth table: send when the snippet changed, or when the periodic resend interval has elapsed. Thebool(...)wrapper keeps should_send a plain boolean even when snippet is an empty string, matching the original False default.Links
/api/admin/audit/events, event typeshermes_autotriage_incidentandhermes_autotriage_diagnosis.Filed automatically by Ariadne from a Hermes Agent diagnosis (run run_0d3e593472f74334a0e18b0ed945a719). Hermes has no write access to this repository; no files or infrastructure were changed.