The agent that grows with you
Python aiai-agentai-agentsanthropicchatgptclaudeclaude-codecodexhermeshermes-agentllmnous-researchopenai
refactor(misc): join short multi-line statements (AST-identical)
Teknium8cd56917b6a6
diff --git a/batch_runner.py b/batch_runner.pyindex 347883a14db..53caf4a1c60 100644--- a/batch_runner.py+++ b/batch_runner.py@@ -298,10 +298,7 @@ def _process_batch_worker(args: Tuple) -> Dict[str, Any]:output_dir = Path(output_dir)print(f"\nπ Batch {batch_num}: Starting ({len(batch_data)} prompts)")batch_output_file = output_dir / f"batch_{batch_num}.jsonl"- prompts_to_process = [- (idx, data) for idx, data in batch_data- if idx not in completed_prompts_set- ]+ prompts_to_process = [(idx, data) for idx, data in batch_data if idx not in completed_prompts_set]if not prompts_to_process:print(f"β Batch {batch_num}: Already completed (skipping)")@@ -497,12 +494,7 @@ class BatchRunner:return _chunk(list(enumerate(self.dataset)), self.batch_size)def _empty_checkpoint(self) -> Dict[str, Any]:- return {- "run_name": self.run_name,- "completed_prompts": [],- "batch_stats": {},- "last_updated": None- }+ return {"run_name": self.run_name, "completed_prompts": [], "batch_stats": {}, "last_updated": None}def _load_checkpoint(self) -> Dict[str, Any]:"""Checkpoint data (completed prompt indices), or an empty one if missing/unreadable."""diff --git a/hermes_constants.py b/hermes_constants.pyindex d8eff1a11b4..8855141c418 100644--- a/hermes_constants.py+++ b/hermes_constants.py@@ -1039,9 +1039,7 @@ def resolve_reasoning_config(cfg: dict | None, model: str = "") -> dict | None:result = parse_reasoning_effort(effort)if effort and str(effort).strip() and result is None:import logging- logging.getLogger(__name__).warning(- "Unknown reasoning_effort '%s', using default (medium)", effort- )+ logging.getLogger(__name__).warning("Unknown reasoning_effort '%s', using default (medium)", effort)return result@@ -1178,9 +1176,7 @@ def apply_ipv4_preference(force: bool = False) -> None:def _ipv4_getaddrinfo(host, port, family=0, type=0, proto=0, flags=0):if family == 0: # AF_UNSPEC β caller didn't request a specific familytry:- return _original_getaddrinfo(- host, port, socket.AF_INET, type, proto, flags- )+ return _original_getaddrinfo(host, port, socket.AF_INET, type, proto, flags)except socket.gaierror: # no A record β pure-IPv6 hostreturn _original_getaddrinfo(host, port, family, type, proto, flags)return _original_getaddrinfo(host, port, family, type, proto, flags)diff --git a/hermes_startup_watchdog.py b/hermes_startup_watchdog.pyindex 99856899092..70acc45ce7f 100644--- a/hermes_startup_watchdog.py+++ b/hermes_startup_watchdog.py@@ -434,11 +434,7 @@ class StartupWatchdogHandle:returndef _start(self) -> bool:- thread = threading.Thread(- target=self._run,- daemon=True,- name="gateway-startup-watchdog",- )+ thread = threading.Thread(target=self._run, daemon=True, name="gateway-startup-watchdog")try:thread.start()except Exception: