mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-11-06 05:17:15 +00:00
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:
1 parent
802fd5782f
commit
c0ef5af520
2 files changed
+2
-3
No files matched your search
@@ -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:
|
||||
|
||||
@@ -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
|
||||
Reference in new issue
Block a user