Skip to content

Commit c1c9a4b

Browse files
committed
fix IndexError regression with E275
1 parent a793839 commit c1c9a4b

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)