Skip to content

Commit

Permalink
[fix] class and functions handle inner whitespaces so I don't have to…
Browse files Browse the repository at this point in the history
… take care of it
  • Loading branch information
Psycojoker committed Jan 30, 2015
1 parent 4b5a173 commit 6921ff8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions redbaron.py
Original file line number Diff line number Diff line change
Expand Up @@ -1525,7 +1525,8 @@ def generate_separator():
expected_list.pop()

expected_list.append(i)
expected_list.append(generate_separator())
if i.type not in ('function', 'class'):
expected_list.append(generate_separator())

if expected_list:
if self.parent and self.parent.next:
Expand Down Expand Up @@ -2745,7 +2746,7 @@ def generate_separator():

expected_list.append(i)

if not (i.type == "endl" and position == 0):
if not (i.type == "endl" and position == 0) and (i.type not in ('function', 'class')):
expected_list.append(generate_separator())

return expected_list
Expand Down

0 comments on commit 6921ff8

Please sign in to comment.