Refactored code to be more concise
This commit is contained in:
parent
d79a01cfb1
commit
58aea47921
13 changed files with 64 additions and 46 deletions
dockge_cli/models
|
@ -1,3 +1,3 @@
|
|||
from .codes import StackStatus
|
||||
from .commands import Command
|
||||
from .command import Command
|
||||
from .parser import Arguments, Credentials
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
Loading…
Add table
Add a link
Reference in a new issue