style(gateway): drop a constant getattr and explicit None returns

Current main enables ruff's B009 and RET501, which flag a constant `getattr` in the completion delivery code and two explicit `return None` statements in the requeue helper once this branch is merged. No behaviour change.
This commit is contained in:
yoniebans authored and jonny committed 2026-10-11 19:27:06 +02:00
1 parent 802fd5782f
commit c0ef5af520
2 files changed
+2 -3

No files matched your search

+1 -1
View File
@@ -1294,7 +1294,7 @@ class GatewayNotificationsMixin(GatewayNotificationOwnershipMixin):
entry = None
if session_key:
try:
session_store = cast(SessionStore, getattr(self, "session_store"))
session_store: SessionStore = cast(Any, self).session_store
await asyncio.to_thread(session_store._ensure_loaded)
entry = session_store._entries.get(session_key)
except Exception:
+1 -2
View File
@@ -211,7 +211,7 @@ class GatewayNotificationOwnershipMixin:
"""Offer admitted completions again when the turn could not confirm their owner (``retry``),
so the next delivery re-runs the pre-flight; boundary verdicts stay dropped."""
if verdict != "retry" or not completion_ids:
return None
return
from tools.async_delegation import requeue_admitted_completion
from tools.process_registry import process_registry
runner = cast(Any, self)
@@ -229,4 +229,3 @@ class GatewayNotificationOwnershipMixin:
"Async-delegation completion %s: owner not confirmed after admission; %s.", delegation_id,
"offered again" if requeued else "not offered again (result remains queryable)",
)
return None