From 23cc8c9ec9e0eb4273909d64b701392a36249c29 Mon Sep 17 00:00:00 2001 From: imSp4rky Date: Fri, 5 Jun 2026 15:17:55 -0600 Subject: [PATCH] refactor(cli): replace deprecated click.MultiCommand with click.Group MultiCommand is deprecated since Click 8.3 and removed in 9.0; its functionality was folded into Group, which supports the same list_commands/get_command lazy-loading overrides. Unblocks a future Click 9 bump and silences the import-time DeprecationWarning that broke test collection under -W error::DeprecationWarning. --- unshackle/core/commands.py | 2 +- unshackle/core/services.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/unshackle/core/commands.py b/unshackle/core/commands.py index 0ea9b51..24bb7d2 100644 --- a/unshackle/core/commands.py +++ b/unshackle/core/commands.py @@ -59,7 +59,7 @@ def check_load_errors() -> None: raise click.ClickException(f"Failed to load {len(LOAD_ERRORS)} command(s):\n{joined}") -class Commands(click.MultiCommand): +class Commands(click.Group): """Lazy-loaded command group of project commands.""" def list_commands(self, ctx: click.Context) -> list[str]: diff --git a/unshackle/core/services.py b/unshackle/core/services.py index 58afe82..7713eca 100644 --- a/unshackle/core/services.py +++ b/unshackle/core/services.py @@ -76,7 +76,7 @@ def check_load_errors() -> None: raise click.ClickException(f"Failed to load {len(LOAD_ERRORS)} service(s):\n{joined}") -class Services(click.MultiCommand): +class Services(click.Group): """Lazy-loaded command group of project services.""" _remote_services_cache: list[dict] | None = None