(m)
| 156 | re.VERBOSE, |
| 157 | ) |
| 158 | def replace_match(m): |
| 159 | raw = next(g for g in m.groups() if g is not None) |
| 160 | try: |
| 161 | val = ast.literal_eval(raw) |
| 162 | if isinstance(val, (str, bytes)): |
| 163 | return val if isinstance(val, str) else val.decode('utf-8', errors='replace') |
| 164 | except Exception: |
| 165 | pass |
| 166 | return m.group(0) |
| 167 | source = pattern.sub(replace_match, source) |
| 168 | |
| 169 | # Pattern 2: eval(compile("literal", ...)) or exec(compile("literal", ...)) |
nothing calls this directly
no outgoing calls
no test coverage detected