Skip to content

Commit d0b6eab

Browse files
committed
add optional for Argument, choice_alias for Variant
1 parent 894624c commit d0b6eab

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

dargs/dargs.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -661,6 +661,7 @@ def default(self, obj) -> Dict[str, Union[str, bool, List]]:
661661
"object": "Argument",
662662
"name": obj.name,
663663
"type": obj.dtype,
664+
"optional": obj.optional,
664665
"alias": obj.alias,
665666
"doc": obj.doc,
666667
"repeat": obj.repeat,
@@ -674,6 +675,7 @@ def default(self, obj) -> Dict[str, Union[str, bool, List]]:
674675
"optional": obj.optional,
675676
"default_tag": obj.default_tag,
676677
"choice_dict": obj.choice_dict,
678+
"choice_alias": obj.choice_alias,
677679
"doc": obj.doc,
678680
}
679681
elif isinstance(obj, type):

0 commit comments

Comments
 (0)