From 42a998d45410aebac5ad785db88465e694443982 Mon Sep 17 00:00:00 2001 From: dw-0 Date: Tue, 21 Jul 2026 19:53:53 +0200 Subject: [PATCH] refactor: remove unused command execution functions from backend --- kiauh/core/backends/__init__.py | 24 +----------------------- 1 file changed, 1 insertion(+), 23 deletions(-) diff --git a/kiauh/core/backends/__init__.py b/kiauh/core/backends/__init__.py index 623b9b64..87156ce0 100644 --- a/kiauh/core/backends/__init__.py +++ b/kiauh/core/backends/__init__.py @@ -13,7 +13,7 @@ from __future__ import annotations import shutil import subprocess from pathlib import Path -from typing import Any, List, Protocol, Sequence, cast, runtime_checkable +from typing import Any, Protocol, Sequence, cast # --------------------------------------------------------------------------- # # Singleton backends # @@ -27,27 +27,6 @@ from typing import Any, List, Protocol, Sequence, cast, runtime_checkable # per-module duplicates -def run(cmd: str | List[str], **kwargs: Any) -> subprocess.CompletedProcess[str]: - """Run a command through the shared command runner.""" - return command_runner.run(cmd, **kwargs) - - -def check_output(cmd: str | List[str], **kwargs: Any) -> str | bytes: - """Run a command and return its output through the shared command runner.""" - return command_runner.check_output(cmd, **kwargs) - - -def call(cmd: str | List[str], **kwargs: Any) -> int: - """Run a command and return its exit code through the shared command runner.""" - return command_runner.call(cmd, **kwargs) - - -def popen(cmd: str | List[str], **kwargs: Any) -> subprocess.Popen: - """Start a process through the shared command runner.""" - return command_runner.popen(cmd, **kwargs) - - -@runtime_checkable class CommandRunner(Protocol): """Pluggable backend for executing system commands.""" @@ -108,7 +87,6 @@ class SubprocessRunner: return subprocess.Popen(cmd, **kwargs) -@runtime_checkable class FilesystemBackend(Protocol): """Pluggable backend for filesystem operations."""