diff options
Diffstat (limited to 'coverage/misc.py')
-rw-r--r-- | coverage/misc.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/coverage/misc.py b/coverage/misc.py index 0f985be0..30b75744 100644 --- a/coverage/misc.py +++ b/coverage/misc.py @@ -329,10 +329,12 @@ def substitute_variables(text, variables): ) """ + dollar_groups = ('dollar', 'word1', 'word2') + def dollar_replace(match): """Called for each $replacement.""" # Only one of the groups will have matched, just get its text. - word = next(g for g in match.group('dollar', 'word1', 'word2') if g) + word = next(g for g in match.group(*dollar_groups) if g) # pragma: always breaks if word == "$": return "$" elif word in variables: |