2021.4 #19

Merged
edraft merged 237 commits from 2021.4 into master 2021-04-01 10:13:33 +02:00
3 changed files with 19 additions and 6 deletions
Showing only changes of commit 956a107d38 - Show all commits

View File

@ -0,0 +1,13 @@
from abc import abstractmethod
from cpl.dependency_injection.service_abc import ServiceABC
class CommandABC(ServiceABC):
@abstractmethod
def __init__(self):
ServiceABC.__init__(self)
@abstractmethod
def run(self, args: list[str]): pass

View File

@ -1,11 +1,11 @@
from cpl.console.console import Console from cpl.console.console import Console
from cpl.dependency_injection.service_abc import ServiceABC from cpl_cli.command_abc import CommandABC
class Help(ServiceABC): class Help(CommandABC):
def __init__(self): def __init__(self):
ServiceABC.__init__(self) CommandABC.__init__(self)
def run(self, args: list[str]): def run(self, args: list[str]):
Console.write_line('Available Commands:') Console.write_line('Available Commands:')

View File

@ -7,13 +7,13 @@ import pkg_resources
import cpl import cpl
import cpl_cli import cpl_cli
from cpl.console.console import Console from cpl.console.console import Console
from cpl.dependency_injection.service_abc import ServiceABC from cpl_cli.command_abc import CommandABC
class Version(ServiceABC): class Version(CommandABC):
def __init__(self): def __init__(self):
ServiceABC.__init__(self) CommandABC.__init__(self)
def run(self, args: list[str]): def run(self, args: list[str]):
Console.set_foreground_color('yellow') Console.set_foreground_color('yellow')