@@ -379,28 +379,32 @@ def set_client_http_parser(parser=None):
379
379
def get_main_parser ():
380
380
# create the top-level parser
381
381
parser = set_base_parser ()
382
+ adf = argparse .ArgumentDefaultsHelpFormatter
382
383
sp = parser .add_subparsers (dest = 'cli' , title = 'GNES sub-commands' ,
383
384
description = 'use "gnes [sub-command] --help" '
384
385
'to get detailed information about each sub-command' )
385
386
386
387
# microservices
387
- set_frontend_parser (sp .add_parser ('frontend' , help = 'start a frontend service' ))
388
- set_encoder_parser (sp .add_parser ('encode' , help = 'start an encoder service' ))
389
- set_indexer_parser (sp .add_parser ('index' , help = 'start an indexer service' ))
390
- set_router_parser (sp .add_parser ('route' , help = 'start a router service' ))
391
- set_preprocessor_parser (sp .add_parser ('preprocess' , help = 'start a preprocessor service' ))
392
- set_grpc_service_parser (sp .add_parser ('grpc' , help = 'start a general purpose grpc service' ))
388
+ set_frontend_parser (sp .add_parser ('frontend' , help = 'start a frontend service' , formatter_class = adf ))
389
+ set_encoder_parser (sp .add_parser ('encode' , help = 'start an encoder service' , formatter_class = adf ))
390
+ set_indexer_parser (sp .add_parser ('index' , help = 'start an indexer service' , formatter_class = adf ))
391
+ set_router_parser (sp .add_parser ('route' , help = 'start a router service' , formatter_class = adf ))
392
+ set_preprocessor_parser (sp .add_parser ('preprocess' , help = 'start a preprocessor service' , formatter_class = adf ))
393
+ set_grpc_service_parser (sp .add_parser ('grpc' , help = 'start a general purpose grpc service' , formatter_class = adf ))
393
394
394
395
pp = sp .add_parser ('client' , help = 'start a GNES client of the selected type' )
395
396
spp = pp .add_subparsers (dest = 'client' , title = 'GNES client sub-commands' ,
396
397
description = 'use "gnes client [sub-command] --help" '
397
398
'to get detailed information about each client sub-command' )
398
399
spp .required = True
399
400
# clients
400
- set_client_http_parser (spp .add_parser ('http' , help = 'start a client that allows HTTP requests as input' ))
401
- set_client_cli_parser (spp .add_parser ('cli' , help = 'start a client that allows stdin as input' ))
402
- set_client_benchmark_parser (spp .add_parser ('benchmark' , help = 'start a client for benchmark and unittest' ))
401
+ set_client_http_parser (
402
+ spp .add_parser ('http' , help = 'start a client that allows HTTP requests as input' , formatter_class = adf ))
403
+ set_client_cli_parser (spp .add_parser ('cli' , help = 'start a client that allows stdin as input' , formatter_class = adf ))
404
+ set_client_benchmark_parser (
405
+ spp .add_parser ('benchmark' , help = 'start a client for benchmark and unittest' , formatter_class = adf ))
403
406
404
407
# others
405
- set_composer_flask_parser (sp .add_parser ('compose' , help = 'start a GNES Board to visualize YAML configs' ))
408
+ set_composer_flask_parser (
409
+ sp .add_parser ('compose' , help = 'start a GNES Board to visualize YAML configs' , formatter_class = adf ))
406
410
return parser
0 commit comments