(self, result)
return modified_lines
Fix indentation undistinguish from the next logical line.
Fix indentation undistinguish from the next logical line.
Fix indentation undistinguish from the next logical line .
def fix_e125(self, result):
        """Fix indentation undistinguish from the next logical line."""
        num_indent_spaces = int(result['info'].split()[1])
        line_index = result['line'] - 1
        target = self.source[line_index]

        spaces_to_add = num_indent_spaces - len(_get_indentation(target))
        indent = len(_get_indentation(target))
        modified_lines = []

        while len(_get_indentation(self.source[line_index])) >= indent:
            self.source[line_index] = (' ' * spaces_to_add +
                                       self.source[line_index])
            modified_lines.append(1 + line_index)  # Line indexed at 1.
            line_index -= 1

        return modified_lines
def fix_e125 ( self , result ) : num_indent_spaces = int ( result [ 'info' ] . split ( ) [ 1 ] ) line_index = result [ 'line' ] - 1 target = self . source [ line_index ] spaces_to_add = num_indent_spaces - len ( _get_indentation ( target ) ) indent = len ( _get_indentation ( target ) ) modified_lines = [ ] while len ( _get_indentation ( self . source [ line_index ] ) ) >= indent : self . source [ line_index ] = ( ' ' * spaces_to_add + self . source [ line_index ] ) modified_lines . append ( 1 + line_index ) # Line indexed at 1. line_index -= 1 return modified_lines