Skip to content

Commit 07be27e

Browse files
authored
Merge pull request #1073 from asottile/fix-E275-regression
fix IndexError regression with E275
2 parents eede9e3 + c1c9a4b commit 07be27e

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

pycodestyle.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -497,8 +497,7 @@ def missing_whitespace_after_keyword(logical_line, tokens):
497497
tok0.string not in SINGLETONS and
498498
tok0.string not in ('async', 'await') and
499499
tok1.string not in ':\n'):
500-
line, pos = tok0.end
501-
yield pos, "E275 missing whitespace after keyword"
500+
yield tok0.end, "E275 missing whitespace after keyword"
502501

503502

504503
@register_check

testsuite/E27.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,6 @@
4949
pass
5050
#: Okay
5151
matched = {"true": True, "false": False}
52+
#: E275:2:11
53+
if True:
54+
assert(1)

0 commit comments

Comments
 (0)