[hermes] atlasbot: python:S1871 #164
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 loop's should_send computation, the if branch (line 168, triggered when the note snippet changed) and the elif branch (line 170, triggered when the stale-resend interval has elapsed) both just set should_send = True, so the if/elif is doing nothing but OR-ing two conditions through duplicated branch bodies.
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 identical-body branches into a single boolean expression that ORs both conditions, which evaluates to True in exactly the same cases (short-circuiting the same way an if/elif does) without any duplicated branch bodies.Links
/api/admin/audit/events, event typeshermes_autotriage_incidentandhermes_autotriage_diagnosis.Filed automatically by Ariadne from a Hermes Agent diagnosis (run run_e4214a3b0ea34dd9b31bb8ef9789b9c4). Hermes has no write access to this repository; no files or infrastructure were changed.