2021.4.1 #11

Merged
edraft merged 172 commits from 2021.04.01 into 2021.04 2021-03-21 20:04:24 +01:00
2 changed files with 23 additions and 21 deletions
Showing only changes of commit 2c43e55f77 - Show all commits

View File

@ -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

View File

@ -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