arg ideas
This commit is contained in:
parent
84c3197758
commit
ee2fcc4c1f
1 changed files with 31 additions and 8 deletions
|
|
@ -231,19 +231,42 @@ cli_to_sub_parser = subparsers.add_parser("cli-to-sub")
|
||||||
|
|
||||||
|
|
||||||
class InspectArguments:
|
class InspectArguments:
|
||||||
INCLUDE_OVERRIDES = CLIArgument(
|
LEVEL = CLIArgument(
|
||||||
short="-v",
|
short="-l",
|
||||||
long="--include-overrides",
|
long="--level",
|
||||||
|
)
|
||||||
|
LevelChoices: List[str] = [
|
||||||
|
"0",
|
||||||
|
"original",
|
||||||
|
"1",
|
||||||
|
"fill",
|
||||||
|
"2",
|
||||||
|
"resolve",
|
||||||
|
"3",
|
||||||
|
"internal",
|
||||||
|
]
|
||||||
|
|
||||||
|
MOCK = CLIArgument(
|
||||||
|
short="-m",
|
||||||
|
long="--mock",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
inspect_parser = subparsers.add_parser("inspect")
|
inspect_parser = subparsers.add_parser("inspect")
|
||||||
inspect_parser.add_argument(
|
inspect_parser.add_argument(
|
||||||
InspectArguments.INCLUDE_OVERRIDES.short,
|
InspectArguments.LEVEL.short,
|
||||||
InspectArguments.INCLUDE_OVERRIDES.long,
|
InspectArguments.LEVEL.long,
|
||||||
action="store_true",
|
metavar="|".join(LoggerLevels.names()),
|
||||||
help="Whether to show override variables.",
|
type=str,
|
||||||
default=False,
|
help="""level of inspection to perform:
|
||||||
|
0 - original present the subscription as-is (default)
|
||||||
|
1 - fill fill in simple variable types
|
||||||
|
2 - resolve resolve all variables
|
||||||
|
3 - internal resolve all variables to their internal representation
|
||||||
|
""",
|
||||||
|
default="0",
|
||||||
|
choices=InspectArguments.LevelChoices,
|
||||||
|
dest="inspection_level",
|
||||||
)
|
)
|
||||||
inspect_parser.add_argument(
|
inspect_parser.add_argument(
|
||||||
MainArguments.MATCH.short,
|
MainArguments.MATCH.short,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue