Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def docstring_dbg():
print(astor.dump_tree(astor.code_to_ast(func)))
:param par_py_files: List of files containing the Python parallelization of each for block in the func_source
:param output: PyCOMPSs file path
:param taskify_loop_level: Loop depth to perform taskification (default None)
:raise Py2PyCOMPSsException:
"""
if __debug__:
logger.debug("[Py2PyCOMPSs] Initialize translation")
logger.debug("[Py2PyCOMPSs] - Function: " + str(func))
for par_f in par_py_files:
logger.debug("[Py2PyCOMPSs] - File: " + str(par_f))
logger.debug("[Py2PyCOMPSs] - Output: " + str(output))
# Load user function code
import astor
func_ast = astor.code_to_ast(func)
# Initialize output content
output_imports = []
task2headers = {}
task2func_code = {}
output_loops_code = []
task_counter_id = 0
# Process each par_py file
for par_py in par_py_files:
# Retrieve file AST
par_py_ast = astor.code_to_ast.parse_file(par_py)
# Process ast
output_code = []
task2new_name = {}