logging_format/visitor.py
def detect_logging_level(self, node):
        """
        Heuristic to decide whether an AST Call is a logging call.

        """
        try:
            if self.get_id_attr(node.func.value) == "warnings":
                return None
            # NB: We could also look at the argument signature or the target attribute
            if node.func.attr in LOGGING_LEVELS:
                return node.func.attr
        except AttributeError:
            pass
        return None
def detect_logging_level(self, node):
        try:
            if self.get_id_attr(node.func.value) == "warnings":
                return None
            # NB: We could also look at the argument signature or the target attribute
            if node.func.attr in LOGGING_LEVELS:
                return node.func.attr
        except AttributeError:
            pass
        return None
def detect_logging_level ( self , node ) : try : if self . get_id_attr ( node . func . value ) == "warnings" : return None # NB: We could also look at the argument signature or the target attribute if node . func . attr in LOGGING_LEVELS : return node . func . attr except AttributeError : pass return None
Heuristic to decide whether an AST Call is a logging call.
Heuristic to decide whether an AST Call is a logging call .