MCPcopy Create free account
hub / github.com/Fadi002/de4py / replace_compile

Method replace_compile

de4py/engines/onyx/string_decoder.py:175–182  ·  view source on GitHub ↗
(m)

Source from the content-addressed store, hash-verified

173 r'\s*,\s*[^)]+\)\s*\)'
174 )
175 def replace_compile(m):
176 try:
177 val = ast.literal_eval(m.group(1))
178 if isinstance(val, str):
179 return val
180 except Exception:
181 pass
182 return m.group(0)
183 source = pattern2.sub(replace_compile, source)
184 return source
185

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected