logging_format/visitor.py
def visit_BinOp(self, node):
        """
        Process binary operations while processing the first logging argument.

        """
        if self.within_logging_statement() and self.within_logging_argument():
            # handle percent format
            if isinstance(node.op, Mod):
                self.violations.append((node, PERCENT_FORMAT_VIOLATION))
            # handle string concat
            if isinstance(node.op, Add):
                self.violations.append((node, STRING_CONCAT_VIOLATION))
        super(LoggingVisitor, self).generic_visit(node)
def visit_BinOp(self, node):
        """
        Process binary operations while processing the first logging argument.

        """
        if self.within_logging_statement() and self.within_logging_argument():
            # handle percent format
            if isinstance(node.op, Mod):
                self.violations.append((node, PERCENT_FORMAT_VIOLATION))
            # handle string concat
            if isinstance(node.op, Add):
                self.violations.append((node, STRING_CONCAT_VIOLATION))
        super(LoggingVisitor, self).generic_visit(node)
def visit_BinOp ( self , node ) : if self . within_logging_statement ( ) and self . within_logging_argument ( ) : # handle percent format if isinstance ( node . op , Mod ) : self . violations . append ( ( node , PERCENT_FORMAT_VIOLATION ) ) # handle string concat if isinstance ( node . op , Add ) : self . violations . append ( ( node , STRING_CONCAT_VIOLATION ) ) super ( LoggingVisitor , self ) . generic_visit ( node )
Process binary operations while processing the first logging argument.
Process binary operations while processing the first logging argument .