Skip to content

Commit

Permalink
Move the "rstrip()" to a better place
Browse files Browse the repository at this point in the history
  • Loading branch information
myint committed Mar 27, 2015
1 parent 307e14a commit 0384493
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions autopep8.py
Expand Up @@ -794,7 +794,7 @@ def fix_long_line_logically(self, result, logical):
if fixed:
for line_index in range(start_line_index, end_line_index + 1):
self.source[line_index] = ''
self.source[start_line_index] = fixed.rstrip() + '\n'
self.source[start_line_index] = fixed
return range(start_line_index + 1, end_line_index + 1)
else:
return []
Expand Down Expand Up @@ -1070,7 +1070,7 @@ def untokenize_without_newlines(tokens):
last_row = end_row
last_column = end_column

return text
return text.rstrip()


def _find_logical(source_lines):
Expand Down

0 comments on commit 0384493

Please sign in to comment.