MCPcopy Create free account
hub / github.com/catid/supercharger / get_script_name_from_function_name

Function get_script_name_from_function_name

codegen/codegen.py:47–57  ·  view source on GitHub ↗
(function_name, is_test=False, variation=None)

Source from the content-addressed store, hash-verified

45 raise Exception("No function name found")
46
47def get_script_name_from_function_name(function_name, is_test=False, variation=None):
48 if variation is None:
49 if is_test:
50 return f"test_{function_name}.py"
51 else:
52 return f"{function_name}.py"
53 else:
54 if is_test:
55 return f"test_{function_name}_{variation}.py"
56 else:
57 return f"{function_name}_{variation}.py"
58
59def delete_old_scripts(sources_dirname, func_name):
60 dir_path = os.path.join(sources_dirname, func_name)

Callers 3

write_script_to_diskFunction · 0.85
copy_candidate_scriptsFunction · 0.85
copy_and_run_pytestFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected