try_except_continue.py 文件源码

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

项目:bandit-ss 作者: zeroSteiner 项目源码 文件源码
def try_except_continue(context, config):
    node = context.node
    if len(node.body) == 1:
        if (not config['check_typed_exception'] and
                node.type is not None and
                getattr(node.type, 'id', None) != 'Exception'):
            return

        if isinstance(node.body[0], ast.Continue):
            return bandit.Issue(
                severity=bandit.LOW,
                confidence=bandit.HIGH,
                text=("Try, Except, Continue detected."))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号