Skip to content

Commit

Permalink
Replace "yield from" with regular yield to avoid requiring Python 3
Browse files Browse the repository at this point in the history
  • Loading branch information
acehreli authored and henryiii committed Apr 10, 2018
1 parent dfdcc26 commit 88fc98d
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions plumbum/cli/application.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ def main(self, src, dst):

def __new__(cls, executable=None):
"""Allows running the class directly as a shortcut for main.
This is neccessary for some setup scripts that want a single function,
This is necessary for some setup scripts that want a single function,
instead of an expression with a dot in it."""


Expand Down Expand Up @@ -658,7 +658,8 @@ def current():

if len(line) == 0:
# Starting a new paragraph
yield from current()
for item in current():
yield item
yield "", "", ""

paragraph = None
Expand All @@ -679,7 +680,8 @@ def has_invisible_bullet(line):

if is_list_item(line):
# Done with current paragraph
yield from current()
for item in current():
yield item

if has_invisible_bullet(line):
line = line[1:]
Expand All @@ -701,7 +703,8 @@ def has_invisible_bullet(line):
# Add to current paragraph
paragraph = paragraph + ' ' + line

yield from current()
for item in current():
yield item


def wrapped_paragraphs(text, width):
Expand Down

0 comments on commit 88fc98d

Please sign in to comment.