Update RunCodeFileEditAtomicFlow.py
Browse files58 unmodified lines5960616263646558 unmodified lines# to re-import the library.code_lang = input_data["language"].lower()code_lib_name = os.path.splitext(os.path.basename(code_lib_location))[0]if code_lang == 'python' and code_lib_name in code_str:prepend_code = f"import importlib\nimport {code_lib_name}\nimportlib.reload({code_lib_name})\n"code_str = prepend_code + code_str58 unmodified lines5960616263646558 unmodified lines# to re-import the library.code_lang = input_data["language"].lower()code_lib_name = os.path.splitext(os.path.basename(code_lib_location))[0]if code_lang == 'python' and code_lib_name in code_str and 'importlib.reload' not in code_str:prepend_code = f"import importlib\nimport {code_lib_name}\nimportlib.reload({code_lib_name})\n"code_str = prepend_code + code_str
RunCodeFileEditAtomicFlow.py+1-1