File size: 554 Bytes
7e02c6a b0b56bd dd8fb0e b0b56bd 7e02c6a dd8fb0e 7e02c6a b0b56bd 7e02c6a b0b56bd |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
from typing import Optional, Dict, Any
from abc import ABC, abstractmethod
class CommandHandler(ABC):
# {"base": {"name": command}, "advance": {"name": command}}
@abstractmethod
def get_command() -> Dict[str, Dict[str, list]]:
"Method to get command from yaml file and return dictionary"
pass
@abstractmethod
def is_contains() -> bool:
"""Method to check contains command in text or not"""
pass
@abstractmethod
def execute() -> Any:
"Method to execute command"
pass
|