[hermes] atlasbot: python:S1871 #140
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() closure, the if/elif at lines 167-170 both set should_send = True in their bodies, so the branch on line 168 and the branch on line 170 are byte-for-byte identical, which is exactly what S1871 flags — the branching adds no behavioral difference, only the condition matters.
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 if/elif into a single boolean assignment using 'or' so there is only one place assigning should_send = True. Python's short-circuit evaluation of 'or' preserves the exact original control flow (the second condition is still only evaluated when the first is falsy), so behavior is unchanged.Links
/api/admin/audit/events, event typeshermes_autotriage_incidentandhermes_autotriage_diagnosis.Filed automatically by Ariadne from a Hermes Agent diagnosis (run run_f16db5ffe9f74c3db64a435e9b36cd2f). Hermes has no write access to this repository; no files or infrastructure were changed.