diff --git a/agent_cli/_tools.py b/agent_cli/_tools.py index 1a7ce895..9f068b02 100644 --- a/agent_cli/_tools.py +++ b/agent_cli/_tools.py @@ -130,7 +130,7 @@ def execute_code(code: str) -> str: except subprocess.CalledProcessError as e: return f"Error executing code: {e.stderr}" except FileNotFoundError: - return f"Error: Command not found: {code.split()[0]}" + return f"Error: Command not found: {code.split(maxsplit=1)[0]}" def add_memory(content: str, category: str = "general", tags: str = "") -> str: diff --git a/agent_cli/agents/transcribe_live.py b/agent_cli/agents/transcribe_live.py index f5e8640c..d4c61220 100644 --- a/agent_cli/agents/transcribe_live.py +++ b/agent_cli/agents/transcribe_live.py @@ -188,7 +188,7 @@ async def _process_segment( # noqa: PLR0912 if cfg.clipboard: import pyperclip # noqa: PLC0415 - text_to_copy = processed if processed else transcript + text_to_copy = processed or transcript pyperclip.copy(text_to_copy) # Log diff --git a/agent_cli/core/deps.py b/agent_cli/core/deps.py index 7ee0d874..10254ebd 100644 --- a/agent_cli/core/deps.py +++ b/agent_cli/core/deps.py @@ -61,7 +61,7 @@ def _is_uvx_cache() -> bool: def _check_package_installed(pkg: str) -> bool: """Check if a single package is installed.""" - top_module = pkg.split(".")[0] + top_module = pkg.split(".", maxsplit=1)[0] try: return find_spec(top_module) is not None except (ValueError, ModuleNotFoundError): diff --git a/agent_cli/dev/cli.py b/agent_cli/dev/cli.py index a38def29..9eb9640c 100644 --- a/agent_cli/dev/cli.py +++ b/agent_cli/dev/cli.py @@ -311,7 +311,7 @@ def _get_config_agent_env() -> dict[str, dict[str, str]] | None: agent_name = key[len(prefix) :] result[agent_name] = value - return result if result else None + return result or None def _get_agent_env(agent: CodingAgent) -> dict[str, str]: @@ -350,7 +350,7 @@ def _merge_agent_args( if cli_args: result.extend(cli_args) - return result if result else None + return result or None def _is_ssh_session() -> bool: diff --git a/agent_cli/install/service_config.py b/agent_cli/install/service_config.py index 057a41b1..dbe15776 100644 --- a/agent_cli/install/service_config.py +++ b/agent_cli/install/service_config.py @@ -135,7 +135,7 @@ def build_service_command( args.extend(["--python", service.python_version]) # Build the command: either custom command path or default "server " - cmd_path = service.command if service.command else ["server", service.name] + cmd_path = service.command or ["server", service.name] args.extend( [ diff --git a/docker/tts.Dockerfile b/docker/tts.Dockerfile index c2040e45..d0181557 100644 --- a/docker/tts.Dockerfile +++ b/docker/tts.Dockerfile @@ -51,7 +51,7 @@ RUN uv sync --frozen --no-dev --no-editable --extra server --extra piper --extra # ============================================================================= # CUDA target: GPU-accelerated with Kokoro TTS # ============================================================================= -FROM nvcr.io/nvidia/cuda:12.9.1-cudnn-runtime-ubuntu24.04 AS cuda +FROM nvcr.io/nvidia/cuda:13.1.1-cudnn-runtime-ubuntu24.04 AS cuda COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/ diff --git a/docker/whisper.Dockerfile b/docker/whisper.Dockerfile index a01e0caf..e57acb07 100644 --- a/docker/whisper.Dockerfile +++ b/docker/whisper.Dockerfile @@ -31,7 +31,7 @@ RUN uv sync --frozen --no-dev --no-editable --extra server --extra faster-whispe # ============================================================================= # CUDA target: GPU-accelerated with faster-whisper # ============================================================================= -FROM nvcr.io/nvidia/cuda:12.9.1-cudnn-runtime-ubuntu24.04 AS cuda +FROM nvcr.io/nvidia/cuda:13.1.1-cudnn-runtime-ubuntu24.04 AS cuda COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/