feat(cli): Better organized CLI arg parsing
This commit is contained in:
+7
-5
@@ -1,8 +1,10 @@
|
||||
import argparse
|
||||
from config.dtype import ArchMgrConfig
|
||||
|
||||
|
||||
def config(config: ArchMgrConfig):
|
||||
print("""
|
||||
Your config can be found at
|
||||
""")
|
||||
print(config)
|
||||
def config(args: argparse.Namespace, config: ArchMgrConfig):
|
||||
if args.conf == "show":
|
||||
print("""
|
||||
Your config can be found at
|
||||
""")
|
||||
print(config)
|
||||
|
||||
+5
-3
@@ -1,4 +1,4 @@
|
||||
from typing import Literal
|
||||
import argparse
|
||||
|
||||
from config.dtype import ArchMgrConfig
|
||||
from templates import ArchMgrTemplates
|
||||
@@ -6,7 +6,9 @@ from templates import ArchMgrTemplates
|
||||
|
||||
# TODO: Templates data
|
||||
def show(
|
||||
config: ArchMgrConfig, spec: ArchMgrTemplates, kind: Literal["bundle"], arg: str
|
||||
config: ArchMgrConfig,
|
||||
spec: ArchMgrTemplates,
|
||||
args: argparse.Namespace,
|
||||
):
|
||||
"""Show details / information about things like contents pkg bundles
|
||||
|
||||
@@ -16,4 +18,4 @@ def show(
|
||||
kind: The type of information to get
|
||||
arg: The arg for the command (e.g. bundle name)
|
||||
"""
|
||||
pass
|
||||
print(args)
|
||||
|
||||
Reference in New Issue
Block a user