Refactored code to be more concise

This commit is contained in:
Firq 2024-07-06 00:16:41 +02:00
parent d79a01cfb1
commit 58aea47921
Signed by: Firq
GPG key ID: 3ACC61C8CEC83C20
13 changed files with 64 additions and 46 deletions

View file

@ -1,3 +1,3 @@
from .codes import StackStatus
from .commands import Command
from .command import Command
from .parser import Arguments, Credentials

View file

@ -2,9 +2,8 @@ from enum import Enum
class StackStatus(Enum):
"""
mapping codes for status vs text
mapping for plaintext vs statuscode
"""
# pylint: disable=invalid-name
inactive = 1
running = 3
exited = 4
INACTIVE = 1
RUNNING = 3
EXITED = 4

View file

@ -6,7 +6,7 @@ class Command(BaseModel):
Basic command structure for the CLI to automatically generate valid commands
"""
cmd: str
bind: Callable
func: Callable
args: int
optional: bool
description: str