parsers.py 文件源码

python
阅读 27 收藏 0 点赞 0 评论 0

项目:cligraphy 作者: Netflix-Skunkworks 项目源码 文件源码
def add_namespace(self, namespace, parent):
        desc = '%s sub-command group' % namespace.capitalize()
        temp = parent.add_parser(namespace,
                                 help=desc,
                                 description=desc,
                                 formatter_class=CustomDescriptionFormatter,
                                 add_help=False)
        temp.add_argument('-h', '--help', dest='_help', action=argparse._HelpAction)
        sub = temp.add_subparsers(help='Available sub-commands', parser_class=BaseParser)
        self.sub_map[namespace] = sub
        return sub
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号