def _default_parser(self):
parser = ArgumentParser(prog='<STR_LIT>')<EOL>cmds = {c.title: c for c in self.commands}<EOL>subparsers = parser.add_subparsers()<EOL>for c in self.commands:<EOL><INDENT>p = subparsers.add_parser(c.title, help=c.help)<EOL>c.parser = p<EOL>for (flags, kwargs) in c.args:<EOL><INDENT>p.add_argument(*flags.split(), **kwargs)<EOL><DEDENT>p.set_defaults(cmd=c)<EOL>c.ctx = self.ctx<EOL>c.cmds = cmds<EOL>c.cli = self<EOL><DEDENT>return parser<EOL>
Generate a parser using the command list