From 01759e309a08a2faea2ee35586304cf0cbc195eb Mon Sep 17 00:00:00 2001 From: codex Date: Fri, 7 Aug 2026 00:05:56 -0300 Subject: [PATCH] fix(hermes): use partition instead of a magic length comparison PLR2004. Pushed the previous commit with this gate failing - my check ran all four gates in one block and the output of the passing ones scrolled the failure off. Running them separately is the fix for that, not running them faster. Co-Authored-By: Claude Opus 5 --- ariadne/services/hermes_sonar_client.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ariadne/services/hermes_sonar_client.py b/ariadne/services/hermes_sonar_client.py index 981398e..ed19903 100644 --- a/ariadne/services/hermes_sonar_client.py +++ b/ariadne/services/hermes_sonar_client.py @@ -171,10 +171,10 @@ def issue_url(incident_id: str, ui_url: str) -> str: text = str(incident_id or "") if not base or not text.startswith(INCIDENT_PREFIX): return "" - parts = text[len(INCIDENT_PREFIX) :].split("/", 1) - if len(parts) != 2 or not parts[0].strip() or not parts[1].strip(): + project, separator, key = text[len(INCIDENT_PREFIX) :].partition("/") + if not separator or not project.strip() or not key.strip(): return "" - return base + _ISSUE_PATH.format(project=parts[0].strip(), key=parts[1].strip()) + return base + _ISSUE_PATH.format(project=project.strip(), key=key.strip()) def _types(cfg: dict) -> tuple[str, ...]: