style: restore PEP8 blank-line separation after dead-code removal
The deletions in the salvaged commit left some top-level defs/classes separated by a single blank line. Restore the 2-blank-line separation.
This commit is contained in:
@@ -256,6 +256,8 @@ def _schedule_auto_delete(urls: list[str], delay_seconds: int = _AUTO_DELETE_SEC
|
||||
policy handles cleanup.
|
||||
"""
|
||||
_record_pending(urls, delay_seconds=delay_seconds)
|
||||
|
||||
|
||||
def _upload_paste_rs(content: str) -> str:
|
||||
"""Upload to paste.rs. Returns the paste URL.
|
||||
|
||||
|
||||
@@ -3958,6 +3958,8 @@ def _setup_whatsapp():
|
||||
from hermes_cli.main import cmd_whatsapp
|
||||
import argparse
|
||||
cmd_whatsapp(argparse.Namespace())
|
||||
|
||||
|
||||
def _setup_dingtalk():
|
||||
"""Configure DingTalk — QR scan (recommended) or manual credential entry."""
|
||||
from hermes_cli.setup import (
|
||||
@@ -4128,6 +4130,8 @@ def _setup_wecom():
|
||||
|
||||
print()
|
||||
print_success("💬 WeCom configured!")
|
||||
|
||||
|
||||
def _is_service_installed() -> bool:
|
||||
"""Check if the gateway is installed as a system service."""
|
||||
if supports_systemd_services():
|
||||
|
||||
@@ -4863,6 +4863,8 @@ def detect_stale_running(
|
||||
# spawn_failed / timed_out / crashed counters.
|
||||
|
||||
return reclaimed
|
||||
|
||||
|
||||
def _error_fingerprint(error_text: str) -> str:
|
||||
"""Normalize an error message for grouping identical failures.
|
||||
|
||||
@@ -6948,6 +6950,8 @@ def get_run(conn: sqlite3.Connection, run_id: int) -> Optional[Run]:
|
||||
"SELECT * FROM task_runs WHERE id = ?", (int(run_id),),
|
||||
).fetchone()
|
||||
return Run.from_row(row) if row else None
|
||||
|
||||
|
||||
def latest_run(conn: sqlite3.Connection, task_id: str) -> Optional[Run]:
|
||||
"""Return the most recent run regardless of outcome (active or closed)."""
|
||||
row = conn.execute(
|
||||
|
||||
@@ -6158,6 +6158,8 @@ def cmd_webhook(args):
|
||||
from hermes_cli.webhook import webhook_command
|
||||
|
||||
webhook_command(args)
|
||||
|
||||
|
||||
def cmd_slack(args):
|
||||
"""Slack integration helpers.
|
||||
|
||||
|
||||
@@ -1186,6 +1186,8 @@ def _format_price_per_mtok(per_token_str: str) -> str:
|
||||
return "free"
|
||||
per_m = val * 1_000_000
|
||||
return f"${per_m:.2f}"
|
||||
|
||||
|
||||
def fetch_models_with_pricing(
|
||||
api_key: str | None = None,
|
||||
base_url: str = "https://openrouter.ai/api",
|
||||
|
||||
@@ -20,6 +20,8 @@ from hermes_cli.config import load_config
|
||||
DEFAULT_PORTAL_URL = "https://portal.nousresearch.com"
|
||||
SUBSCRIPTION_URL = "https://portal.nousresearch.com/manage-subscription"
|
||||
DOCS_URL = "https://hermes-agent.nousresearch.com/docs/user-guide/features/tool-gateway"
|
||||
|
||||
|
||||
def _cmd_status(args) -> int:
|
||||
"""Show Portal auth + Tool Gateway routing summary."""
|
||||
from hermes_cli.auth import get_nous_auth_status
|
||||
|
||||
Reference in New Issue
Block a user