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

Debugged a small thing in the rewritte of single line conditions

parent e614041d
No related branches found
No related tags found
No related merge requests found
Pipeline #14633 failed with stage
in 2 minutes and 6 seconds
...@@ -109,7 +109,7 @@ class Code: ...@@ -109,7 +109,7 @@ class Code:
extracted_condition = get_code_until_parenthese_count(code=temp_code[end_condition:], val=-1) extracted_condition = get_code_until_parenthese_count(code=temp_code[end_condition:], val=-1)
condition = extracted_condition[:-1] condition = extracted_condition[:-1]
#body = extarcted.replace(extracted_condition.strip(), "", 1).strip() #body = extarcted.replace(extracted_condition.strip(), "", 1).strip()
body = re.sub(r"if *\("+re.escape(extracted_condition.strip()), "", all).strip() body = re.sub(r"if *\( *"+re.escape(extracted_condition.strip()), "", all).strip()
if(body!="" and body[0]!="{"): if(body!="" and body[0]!="{"):
new = f"if ({condition}) {{\n{body}\n}}\n" new = f"if ({condition}) {{\n{body}\n}}\n"
to_replace.append((all, new)) to_replace.append((all, new))
......
...@@ -1082,7 +1082,7 @@ George Marchment, Bryan Brancotte, Marie Schmit, Frédéric Lemoine, Sarah Cohen ...@@ -1082,7 +1082,7 @@ George Marchment, Bryan Brancotte, Marie Schmit, Frédéric Lemoine, Sarah Cohen
for ele in c: for ele in c:
if(ele.get_type()=="Operation"): if(ele.get_type()=="Operation"):
if(ele.get_create_loop_with_call_status()): if(ele.get_create_loop_with_call_status()):
raise BioFlowInsightError(f'BioFlow-Insight cannot rewrite the workflows since the operation "{ele.get_code(get_OG = True)}" creates the channel on which it depends.', type="Rewrite Error") raise BioFlowInsightError(f'BioFlow-Insight cannot rewrite the workflows since the operation "{ele.get_code(get_OG = True)}" defines the channel on which it depends. Simply try to renaming the channel.', type="Rewrite Error")
if(ele.get_artificial_status()==False): if(ele.get_artificial_status()==False):
tab.append(ele) tab.append(ele)
else: else:
......
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