Skip to content

Commit

Permalink
strict pep8
Browse files Browse the repository at this point in the history
  • Loading branch information
hhatto committed Dec 25, 2016
1 parent e639490 commit 259aded
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions autopep8.py
Expand Up @@ -761,18 +761,18 @@ def fix_e305(self, result):
"""Add missing 2 blank lines after end of function or class."""
cr = '\n'
# check comment line
offset = 2
offset = result['line'] - 2
while True:
if (result['line'] - offset) < 0:
if offset < 0:
break
l = self.source[result['line'] - offset].lstrip()
l = self.source[offset].lstrip()
if len(l) == 0:
break
if self.source[result['line'] - offset].lstrip()[0] != '#':
if l[0] != '#':
break
offset += 1
offset -= 1
self.source[result['line'] - offset] = cr + self.source[result['line'] - offset]
offset -= 1
offset += 1
self.source[offset] = cr + self.source[offset]

def fix_e401(self, result):
"""Put imports on separate lines."""
Expand Down

0 comments on commit 259aded

Please sign in to comment.