(self, result)
Remove whitespace around parameter '=' sign.
Remove whitespace around parameter '=' sign.
Remove whitespace around parameter = sign .
def fix_e251(self, result):
        """Remove whitespace around parameter '=' sign."""
        line_index = result['line'] - 1
        target = self.source[line_index]

        # This is necessary since pycodestyle sometimes reports columns that
        # goes past the end of the physical line. This happens in cases like,
        # foo(bar\n=None)
        c = min(result['column'] - 1,
                len(target) - 1)

        if target[c].strip():
            fixed = target
        else:
            fixed = target[:c].rstrip() + target[c:].lstrip()

        # There could be an escaped newline
        #
        #     def foo(a=\
        #             1)
        if fixed.endswith(('=\\\n', '=\\\r\n', '=\\\r')):
            self.source[line_index] = fixed.rstrip('\n\r \t\\')
            self.source[line_index + 1] = self.source[line_index + 1].lstrip()
            return [line_index + 1, line_index + 2]  # Line indexed at 1

        self.source[result['line'] - 1] = fixed
def fix_e251 ( self , result ) : line_index = result [ 'line' ] - 1 target = self . source [ line_index ] # This is necessary since pycodestyle sometimes reports columns that # goes past the end of the physical line. This happens in cases like, # foo(bar\n=None) c = min ( result [ 'column' ] - 1 , len ( target ) - 1 ) if target [ c ] . strip ( ) : fixed = target else : fixed = target [ : c ] . rstrip ( ) + target [ c : ] . lstrip ( ) # There could be an escaped newline # #     def foo(a=\ #             1) if fixed . endswith ( ( '=\\\n' , '=\\\r\n' , '=\\\r' ) ) : self . source [ line_index ] = fixed . rstrip ( '\n\r \t\\' ) self . source [ line_index + 1 ] = self . source [ line_index + 1 ] . lstrip ( ) return [ line_index + 1 , line_index + 2 ] # Line indexed at 1 self . source [ result [ 'line' ] - 1 ] = fixed