Skip to content

Commit 19a3925

Browse files
authored
Merge pull request #913 from anntzer/afteronelinerblock
Correctly allow *two* blank lines after a block of one-liners.
2 parents 686c84b + 9184238 commit 19a3925

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

pycodestyle.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1797,6 +1797,7 @@ def expand_indent(line):
17971797
>>> expand_indent(' \t')
17981798
16
17991799
"""
1800+
line = line.rstrip('\n\r')
18001801
if '\t' not in line:
18011802
return len(line) - len(line.lstrip())
18021803
result = 0

testsuite/E30not.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,10 @@ def foo(x):
167167
# for no E30x being emitted.
168168
def bar(): pass
169169
def baz(): pass
170+
171+
172+
def main():
173+
pass
170174
#: E704:4:5 E704:5:5
171175
def foo():
172176
# This emits the (ignored-by-default) E704, but here we're testing

0 commit comments

Comments
 (0)