MCPcopy Create free account
hub / github.com/Speakn0w/RealChart2Code / replace_path_generic

Function replace_path_generic

RealChart2Code_eval/evaluate_task3.py:339–349  ·  view source on GitHub ↗
(match)

Source from the content-addressed store, hash-verified

337
338
339 def replace_path_generic(match):
340 start_quote = match.group(1)
341 original_path = match.group(2)
342 end_quote = match.group(3)
343
344 if Path(original_path).is_absolute():
345 return match.group(0)
346
347 absolute_path = data_directory / original_path
348
349 return f"r'{absolute_path}'"
350
351 processed_code = code_content
352 for pattern in patterns:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected