From 91563f3cfc9e2517b863540b5d75333854ab1422 Mon Sep 17 00:00:00 2001 From: Matt Miller Date: Thu, 9 Jul 2026 21:56:56 -0700 Subject: [PATCH] refactor: remove dead _cloud_ls + install.execute cruft (BE-2838) - Delete jobs._cloud_ls: 0 callers, a superseded parallel impl of the cloud-branch listing that jobs ls now inlines. - install.execute: drop the never-referenced trailing *args/**kwargs and move the misplaced bare-string docstring (it sat after the if pr: block as a no-op expression statement) to the top of the function. - Removing **kwargs surfaced a bogus manager_url kwarg in one test that execute never had a parameter for; **kwargs was silently swallowing it. Drop it (the test asserts skip_torch forwarding, not manager_url). --- comfy_cli/command/install.py | 6 +--- comfy_cli/command/jobs.py | 30 ------------------- .../test_install_python_resolution.py | 1 - 3 files changed, 1 insertion(+), 36 deletions(-) diff --git a/comfy_cli/command/install.py b/comfy_cli/command/install.py index db89f2ed..ed5a0c27 100755 --- a/comfy_cli/command/install.py +++ b/comfy_cli/command/install.py @@ -159,17 +159,13 @@ def execute( skip_requirement: bool = False, fast_deps: bool = False, pr: str | None = None, - *args, - **kwargs, ): + """Install ComfyUI from a given URL.""" # Install ComfyUI from a given PR reference. if pr: url = handle_pr_checkout(pr, comfy_path) version = "nightly" - """ - Install ComfyUI from a given URL. - """ if not workspace_manager.skip_prompting: res = ui.prompt_confirm_action(f"Install from {url} to {comfy_path}?", True) diff --git a/comfy_cli/command/jobs.py b/comfy_cli/command/jobs.py index d9f62a83..8474bf7b 100644 --- a/comfy_cli/command/jobs.py +++ b/comfy_cli/command/jobs.py @@ -1389,36 +1389,6 @@ def _cloud_client(): raise typer.Exit(code=1) from e -def _cloud_ls(*, limit: int) -> None: - from comfy_cli.comfy_client import HTTPError - - cloud_preflight_or_exit() - renderer = get_renderer() - client = _cloud_client() - try: - jobs = client.list_jobs(limit=limit) - except HTTPError as e: - renderer.error( - code="cloud_http_error", - message=f"Cloud /api/jobs failed (HTTP {e.status}): {e.message}", - details={"status": e.status, "body": e.body[:1000]}, - ) - raise typer.Exit(code=1) - - rows = [_cloud_job_to_row(j) for j in jobs[:limit]] - if renderer.is_pretty(): - _render_jobs_pretty(rows, host=client.target.base_url, port=0) - renderer.emit( - { - "base_url": client.target.base_url, - "count": len(rows), - "jobs": [_row_to_dict(r) for r in rows], - }, - command="jobs ls", - where="cloud", - ) - - def _cloud_status_snapshot(prompt_id: str) -> dict | None: """Compose a cloud snapshot from /api/jobs/ + /api/history_v2/.""" from comfy_cli import jobs_state diff --git a/tests/comfy_cli/test_install_python_resolution.py b/tests/comfy_cli/test_install_python_resolution.py index f5d44137..7077f18c 100644 --- a/tests/comfy_cli/test_install_python_resolution.py +++ b/tests/comfy_cli/test_install_python_resolution.py @@ -122,7 +122,6 @@ def test_fast_deps_forwards_skip_torch(self, tmp_path): install.execute( url="https://github.com/test/test.git", - manager_url="https://github.com/test/manager.git", comfy_path=repo_dir, restore=False, skip_manager=True,