refactor(hermes_cli): npm_engine/onepassword — fold trivial intermediates

This commit is contained in:
Teknium
2026-09-02 20:41:33 -07:00
parent 2675bcaafd
commit 13d23e450c
2 changed files with 2 additions and 5 deletions
+1 -3
View File
@@ -93,9 +93,7 @@ def _repo_npm_range() -> str | None:
except (OSError, ValueError):
return None
engines = data.get("engines")
if not isinstance(engines, dict):
return None
value = engines.get("npm")
value = engines.get("npm") if isinstance(engines, dict) else None
return str(value).strip() if value else None
+1 -2
View File
@@ -392,5 +392,4 @@ def _op_whoami(binary: Path, account: str, *, token_value: str = "") -> Optional
return None
if res.returncode != 0:
return None
out = (res.stdout or "").strip()
return out.replace("\n", " ")[:120] or "authenticated"
return (res.stdout or "").strip().replace("\n", " ")[:120] or "authenticated"