diff --git a/src/cpl_cli/command.py b/src/cpl_cli/command.py deleted file mode 100644 index 64de906d..00000000 --- a/src/cpl_cli/command.py +++ /dev/null @@ -1,21 +0,0 @@ -from cpl.dependency_injection.service_abc import ServiceABC - - -class Command: - - def __init__(self, name: str, aliases: list[str], command: ServiceABC): - self._name = name - self._aliases = aliases - self._command = command - - @property - def name(self): - return self._name - - @property - def aliases(self): - return self._aliases - - @property - def command(self): - return self._command diff --git a/src/cpl_cli/command_model.py b/src/cpl_cli/command_model.py new file mode 100644 index 00000000..5d6f57fb --- /dev/null +++ b/src/cpl_cli/command_model.py @@ -0,0 +1,23 @@ +from collections import Callable + +from cpl_cli.command_abc import CommandABC + + +class CommandModel: + + def __init__(self, name: str, aliases: list[str], command: Callable[CommandABC]): + self._name = name + self._aliases = aliases + self._command = command + + @property + def name(self) -> str: + return self._name + + @property + def aliases(self) -> list[str]: + return self._aliases + + @property + def command(self) -> Callable[CommandABC]: + return self._command