src/eric7/DebugClients/Python/coverage/misc.py

branch
eric7
changeset 9252
32dd11232e06
parent 9209
b99e7fd55fd3
--- a/src/eric7/DebugClients/Python/coverage/misc.py	Wed Jul 20 16:03:55 2022 +0200
+++ b/src/eric7/DebugClients/Python/coverage/misc.py	Wed Jul 20 16:13:29 2022 +0200
@@ -324,17 +324,17 @@
 
     def dollar_replace(match):
         """Called for each $replacement."""
-        # Only one of the groups will have matched, just get its text.
+        # Only one of the dollar_groups will have matched, just get its text.
         word = next(g for g in match.group(*dollar_groups) if g)    # pragma: always breaks
         if word == "$":
             return "$"
         elif word in variables:
             return variables[word]
-        elif match.group('strict'):
+        elif match['strict']:
             msg = f"Variable {word} is undefined: {text!r}"
             raise CoverageException(msg)
         else:
-            return match.group('defval')
+            return match['defval']
 
     text = re.sub(dollar_pattern, dollar_replace, text)
     return text

eric ide

mercurial