Skip to content

Commit

Permalink
Merge pull request #585 from yamt/continued_indentation-sync
Browse files Browse the repository at this point in the history
continued_indentation: Make the E128 check similar to pycodestyle
  • Loading branch information
hhatto committed Feb 25, 2021
2 parents 0322e61 + 67f1956 commit ab9760c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions autopep8.py
Original file line number Diff line number Diff line change
Expand Up @@ -316,8 +316,9 @@ def continued_indentation(logical_line, tokens, indent_level, hang_closing,
if hang_closing:
yield (start, 'E133 {}'.format(indent[depth]))
elif indent[depth] and start[1] < indent[depth]:
# Visual indent is broken.
yield (start, 'E128 {}'.format(indent[depth]))
if visual_indent is not True:
# Visual indent is broken.
yield (start, 'E128 {}'.format(indent[depth]))
elif (hanging_indent or
(indent_next and
rel_indent[row] == 2 * DEFAULT_INDENT_SIZE)):
Expand Down
2 changes: 1 addition & 1 deletion test/test_autopep8.py
Original file line number Diff line number Diff line change
Expand Up @@ -1329,7 +1329,7 @@ def test_e12_reindent_with_multiple_fixes(self):
sql = 'update %s set %s %s' % (from_table,
','.join(['%s=%s' % (col, col)
for col in cols]),
for col in cols]),
where_clause)
"""
with autopep8_context(line) as result:
Expand Down

0 comments on commit ab9760c

Please sign in to comment.