mirror of
https://github.com/unshackle-dl/unshackle.git
synced 2026-06-10 03:02:09 +00:00
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.
This commit is contained in:
@@ -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]:
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user