summaryrefslogtreecommitdiff
path: root/pycodestyle.py
diff options
context:
space:
mode:
authorAnthony Sottile <asottile@umich.edu>2020-03-23 10:51:41 -0700
committerAnthony Sottile <asottile@umich.edu>2020-03-23 10:51:41 -0700
commit7e3655b9655ed8a13daa65c6cd2f38a06bfa5469 (patch)
tree0215793a881dc536d23501b10e9bc0a41e6a8182 /pycodestyle.py
parent19a3925a89c71d422b98363d9ccfa8903a65b707 (diff)
downloadpep8-7e3655b9655ed8a13daa65c6cd2f38a06bfa5469.tar.gz
Allow N-and-fewer blank lines before the first top level thing
Diffstat (limited to 'pycodestyle.py')
-rwxr-xr-xpycodestyle.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/pycodestyle.py b/pycodestyle.py
index 235532c..d2e9337 100755
--- a/pycodestyle.py
+++ b/pycodestyle.py
@@ -350,7 +350,7 @@ def blank_lines(logical_line, blank_lines, indent_level, line_number,
top_level_lines = BLANK_LINES_CONFIG['top_level']
method_lines = BLANK_LINES_CONFIG['method']
- if line_number < top_level_lines + 1 and not previous_logical:
+ if not previous_logical and blank_before < top_level_lines:
return # Don't expect blank lines before the first line
if previous_logical.startswith('@'):
if blank_lines: