diff --git a/hermes_cli/npm_engine.py b/hermes_cli/npm_engine.py index b87489e51f..5a5ea34e00 100644 --- a/hermes_cli/npm_engine.py +++ b/hermes_cli/npm_engine.py @@ -129,13 +129,7 @@ def _upgrade_env() -> dict[str, str]: return env -def upgrade_managed_npm( - npm: str, - npm_range: str, - *, - prefix: Path, - quiet: bool = False, -) -> bool: +def upgrade_managed_npm(npm: str, npm_range: str, *, prefix: Path, quiet: bool = False) -> bool: """Upgrade the managed npm at *npm* in place to satisfy *npm_range*. ``--prefix`` targets the managed tree explicitly: a managed install writes ``prefix=~/.local`` @@ -235,12 +229,7 @@ def _provision_managed_npm(npm_range: str | None, *, quiet: bool = False) -> str return managed_npm -def maybe_repair_npm_engine( - npm: str | None, - output: str, - *, - quiet: bool = False, -) -> str | None: +def maybe_repair_npm_engine(npm: str | None, output: str, *, quiet: bool = False) -> str | None: """Repair an ``EBADENGINE`` failure, never touching a foreign toolchain. Truthy exactly when the caller should retry once (with the returned npm path). diff --git a/hermes_cli/oneshot.py b/hermes_cli/oneshot.py index 987a30eef9..7265901129 100644 --- a/hermes_cli/oneshot.py +++ b/hermes_cli/oneshot.py @@ -452,7 +452,4 @@ def _oneshot_clarify_callback(question: str, choices=None, multi_select=False) - f"[oneshot mode: no user available. Pick the best {what} from " f"{choices} using your own judgment and continue.]" ) - return ( - "[oneshot mode: no user available. Make the most reasonable " - "assumption you can and continue.]" - ) + return "[oneshot mode: no user available. Make the most reasonable assumption you can and continue.]" diff --git a/hermes_cli/partial_compress.py b/hermes_cli/partial_compress.py index 546fb0b9f3..a9f473c866 100644 --- a/hermes_cli/partial_compress.py +++ b/hermes_cli/partial_compress.py @@ -18,9 +18,7 @@ DEFAULT_KEEP_LAST = 2 MAX_KEEP_LAST = 100 -def parse_partial_compress_args( - raw_args: str, -) -> Tuple[bool, int, Optional[str]]: +def parse_partial_compress_args(raw_args: str) -> Tuple[bool, int, Optional[str]]: """Parse the argument string after ``/compress`` into ``(partial, keep_last, focus_topic)``. ``here [N]`` / ``up to here [N]`` / ``--keep N`` / ``-k N`` / ``--keep=N`` select the diff --git a/hermes_cli/pets.py b/hermes_cli/pets.py index e5d10b3203..0dfe50b22e 100644 --- a/hermes_cli/pets.py +++ b/hermes_cli/pets.py @@ -278,9 +278,7 @@ def _update_pet_config(when_slug: str | None = None, **values) -> bool: cfg = load_config() pet = cfg.setdefault("display", {}).setdefault("pet", {}) - if when_slug is not None and ( - not isinstance(pet, dict) or str(pet.get("slug", "") or "") != when_slug - ): + if when_slug is not None and (not isinstance(pet, dict) or str(pet.get("slug", "") or "") != when_slug): return False pet.update(values) save_config(cfg) diff --git a/hermes_cli/platform_actions.py b/hermes_cli/platform_actions.py index 94daedc4cc..5cd1c36f90 100644 --- a/hermes_cli/platform_actions.py +++ b/hermes_cli/platform_actions.py @@ -177,18 +177,14 @@ class PlatformActions: # -- v1 verbs ----------------------------------------------------------- - async def add_reaction( - self, platform: str, chat_id: str, message_id: str, emoji: str - ) -> Dict[str, Any]: + async def add_reaction(self, platform: str, chat_id: str, message_id: str, emoji: str) -> Dict[str, Any]: """Add/set an emoji reaction on a platform message.""" return await self._run( "add_reaction", platform, chat_id, message_id, emoji, chat_id=chat_id, message_id=message_id, emoji=emoji, ) - async def set_thread_title( - self, platform: str, chat_id: str, thread_id: str, title: str - ) -> Dict[str, Any]: + async def set_thread_title(self, platform: str, chat_id: str, thread_id: str, title: str) -> Dict[str, Any]: """Rename a thread / forum topic.""" return await self._run( "set_thread_title", platform, chat_id, thread_id, title,