refactor and optimize argspace

This commit is contained in:
2025-11-28 14:31:51 +03:00
parent 1eaf2b6333
commit be178b10c7
7 changed files with 68 additions and 31 deletions
+10 -2
View File
@@ -1,3 +1,11 @@
arg = '-repeat'
from argenta.orchestrator.argparser import ArgSpace, BooleanArgument, ValueArgument
from argenta.orchestrator.argparser.arguments import InputArgument
print(arg[:arg.rfind('-')+1])
argspace = ArgSpace([
InputArgument(name="arg1", value="val1", founder_class=ValueArgument),
InputArgument(name="arg2", value=True, founder_class=BooleanArgument),
InputArgument(name="arg3", value="val3", founder_class=ValueArgument),
])
print(argspace._name_object_paired_args)
print(argspace.get_by_type(ValueArgument))