def _get_arg_parser(self, doc_parser=False):
description = textwrap.dedent(__doc__)
examples = textwrap.dedent('''
mdt-info-protocol my_protocol.prtcl
''')
epilog = self._format_examples(doc_parser, examples)
parser = argparse.ArgumentParser(description=description, epilog=epilog,
formatter_class=argparse.RawTextHelpFormatter)
parser.add_argument('protocol',
action=mdt.shell_utils.get_argparse_extension_checker(['.prtcl']),
help='the protocol file').completer = FilesCompleter(['prtcl'], directories=False)
return parser
评论列表
文章目录