Skip to content

The agent that grows with you

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

yoniebansc0ef5af5205d
diff --git a/gateway/run_notifications.py b/gateway/run_notifications.py
index 2eafbfc0a67..b2dbc7f9666 100644
--- a/gateway/run_notifications.py
+++ b/gateway/run_notifications.py
@@ -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:
diff --git a/gateway/run_notifications_ownership.py b/gateway/run_notifications_ownership.py
index 7d632fe05b4..d73e0f18f29 100644
--- a/gateway/run_notifications_ownership.py
+++ b/gateway/run_notifications_ownership.py
@@ -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