Skip to content

Commit

Permalink
Merge pull request #2124 from sopel-irc/URLCallback-yield-from
Browse files Browse the repository at this point in the history
plugins.rules.URLCallback: use `yield from` expression
  • Loading branch information
dgw authored Jul 6, 2021
2 parents 86cbbe4 + aa52a39 commit e3bdf17
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions sopel/plugins/rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -1675,9 +1675,7 @@ def match(self, bot, pretrigger):
# skip invalid URLs
continue

# TODO: convert to 'yield from' when dropping Python 2.7
for result in self.parse(url):
yield result
yield from self.parse(url)

def parse(self, text):
for regex in self._regexes:
Expand Down

0 comments on commit e3bdf17

Please sign in to comment.