File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -64,10 +64,12 @@ Powerful argparse-like low level parsers:
6464
6565 parser = ArgumentParser()
6666 parser.add_argument(" --config" , action = " config" ) # support config files
67- parser.add_argument(" --opt" , type = Union[int , Literal[" off" ]) # complex arguments via type hints
68- parser.add_function_arguments(main_function, " function" ) # add entire function signatures
67+ parser.add_argument(" --opt" , type = Union[int , Literal[" off" ]]) # complex arguments via type hints
68+ parser.add_function_arguments(main_function, " function" ) # add function parameters
69+ parser.add_class_arguments(SomeClass, " class" ) # add class parameters
6970 ...
7071 cfg = parser.parse_args()
72+ init = parser.instantiate_classes(cfg)
7173 ...
7274
7375
You can’t perform that action at this time.
0 commit comments