summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2020-09-06 14:35:14 +0200
committerGitHub <noreply@github.com>2020-09-06 14:35:14 +0200
commit40baa94a6bf0c62be8c8b03a942116869ce80128 (patch)
tree50eca3f33e60a4bbadd29bf566b294052e509259 /scripts
parented93a2758bdfbeaafc43ac59a611bf2cff92b55c (diff)
downloadpygments-git-40baa94a6bf0c62be8c8b03a942116869ce80128.tar.gz
all: use yield from (#1537)
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/debug_lexer.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/scripts/debug_lexer.py b/scripts/debug_lexer.py
index b736ee4a..d00b6102 100755
--- a/scripts/debug_lexer.py
+++ b/scripts/debug_lexer.py
@@ -52,12 +52,10 @@ class DebuggingRegexLexer(ExtendedRegexLexer):
ctx.pos = m.end()
else:
if not isinstance(self, ExtendedRegexLexer):
- for item in action(self, m):
- yield item
+ yield from action(self, m)
ctx.pos = m.end()
else:
- for item in action(self, m, ctx):
- yield item
+ yield from action(self, m, ctx)
if not new_state:
# altered the state stack?
statetokens = tokendefs[ctx.stack[-1]]