diff options
author | Georg Brandl <georg@python.org> | 2020-09-06 14:35:14 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-06 14:35:14 +0200 |
commit | 40baa94a6bf0c62be8c8b03a942116869ce80128 (patch) | |
tree | 50eca3f33e60a4bbadd29bf566b294052e509259 /scripts | |
parent | ed93a2758bdfbeaafc43ac59a611bf2cff92b55c (diff) | |
download | pygments-git-40baa94a6bf0c62be8c8b03a942116869ce80128.tar.gz |
all: use yield from (#1537)
Diffstat (limited to 'scripts')
-rwxr-xr-x | scripts/debug_lexer.py | 6 |
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]] |