Skip to content
Snippets Groups Projects
Commit 3782c0d0 authored by George Marchment's avatar George Marchment
Browse files

Update small bug

parent b0ba1d7a
No related branches found
No related tags found
No related merge requests found
Pipeline #14902 failed with stage
in 4 minutes and 25 seconds
...@@ -119,8 +119,8 @@ class Code: ...@@ -119,8 +119,8 @@ class Code:
to_replace.append((all, new)) to_replace.append((all, new))
elif(body==""): elif(body==""):
char, pos = get_next_element_caracter(temp_code, end_line) char, pos = get_next_element_caracter(temp_code, end_line)
if(char!="{" and temp_code[pos:pos+3] not in ['"""', "'''"]): #if(char!="{" and temp_code[pos:pos+3] not in ['"""', "'''"]):
raise BioFlowInsightError(f"The condition '({extracted_condition}' was not extracted correctly. Make sure the condition follows the correct syntaxe.", type="Unable to extract condition") # raise BioFlowInsightError(f"The condition '({extracted_condition}' was not extracted correctly. Make sure the condition follows the correct syntaxe.", type="Unable to extract condition")
if(code[start:start+4]=="else" and [quote_single, quote_double, triple_single, triple_double]==[False, False, False, False]): if(code[start:start+4]=="else" and [quote_single, quote_double, triple_single, triple_double]==[False, False, False, False]):
pattern = r"(else *)(.+)\n" pattern = r"(else *)(.+)\n"
...@@ -437,6 +437,7 @@ class Code: ...@@ -437,6 +437,7 @@ class Code:
timeout+=1 timeout+=1
if(timeout>=constant.WHILE_UPPER_BOUND): if(timeout>=constant.WHILE_UPPER_BOUND):
raise BioFlowInsightError("The WHILE_UPPER_BOUND was exceeded. BioFlow-Insight was unable to extarct the conditions. Make sure the workflow uses correct Nextflow syntaxe (https://www.nextflow.io/docs/latest/index.html).", type="Unable to extract conditions") raise BioFlowInsightError("The WHILE_UPPER_BOUND was exceeded. BioFlow-Insight was unable to extarct the conditions. Make sure the workflow uses correct Nextflow syntaxe (https://www.nextflow.io/docs/latest/index.html).", type="Unable to extract conditions")
to_replace = list(set(to_replace))
for r in to_replace: for r in to_replace:
temp = code temp = code
code = code.replace(r, r.replace('\n', " ")) code = code.replace(r, r.replace('\n', " "))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment