sh_cpl/src/cpl_cli/command_abc.py

16 lines
270 B
Python
Raw Normal View History

2021-03-29 13:29:26 +02:00
from abc import abstractmethod, ABC
2021-03-04 17:36:02 +01:00
2021-03-29 13:29:26 +02:00
class CommandABC(ABC):
2021-03-04 17:36:02 +01:00
@abstractmethod
def __init__(self):
2021-03-29 13:29:26 +02:00
ABC.__init__(self)
2021-03-04 17:36:02 +01:00
2021-04-11 16:36:59 +02:00
@property
@abstractmethod
def help_message(self) -> str: pass
2021-03-04 17:36:02 +01:00
@abstractmethod
def run(self, args: list[str]): pass