clitools.py 文件源码

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

项目:skaff 作者: jhxie 项目源码 文件源码
def _get_help_string(self, action):
        if self._add_defaults is None:
            return argparse.HelpFormatter._get_help_string(self, action)
        help = action.help
        if '%(default)' not in action.help:
            if action.default is not argparse.SUPPRESS:
                defaulting_nargs = [argparse.OPTIONAL, argparse.ZERO_OR_MORE]
                if action.option_strings or action.nargs in defaulting_nargs:
                    help += ' (default: %(default)s)'
        return help
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号