refactor(hermes_cli): second pass on the 15 small modules — compact bodies, drop redundant locals/blanks, tighten module docs

This commit is contained in:
Teknium
2026-09-02 21:20:42 -07:00
parent 416a1c1acd
commit fc51206750
14 changed files with 159 additions and 394 deletions
+2 -5
View File
@@ -20,13 +20,10 @@ def resolve_entry_api_key(entry: dict[str, Any] | None) -> str | None:
"""
if not isinstance(entry, dict):
return None
inline = str(entry.get("api_key") or "").strip()
if inline:
if inline := str(entry.get("api_key") or "").strip():
return inline
key_env = str(entry.get("key_env") or entry.get("api_key_env") or "").strip()
if key_env:
if key_env := str(entry.get("key_env") or entry.get("api_key_env") or "").strip():
from agent.secret_scope import get_secret
return (get_secret(key_env) or "").strip() or None
return None