[hermes] atlasbot: python:S1871 #120
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() closure, the if/elif at lines 167-170 both set should_send = True in their bodies, so the two branches are functionally identical and only the boolean condition itself differs — SonarQube flags this as duplicate logic that should be collapsed into a single 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— Replace the if/elif pair that both assign should_send = True with a single boolean expression combining the two conditions via 'or'. This removes the duplicate branch bodies while leaving should_send's truthiness (and therefore the subsequent 'if should_send:' behavior) identical to before.Links
/api/admin/audit/events, event typeshermes_autotriage_incidentandhermes_autotriage_diagnosis.Filed automatically by Ariadne from a Hermes Agent diagnosis (run run_da953c52f1ae4a69b831bc2e9d1dbc7d). Hermes has no write access to this repository; no files or infrastructure were changed.