#2685 Don't raise issues on WR evaluating to indeterminate

This commit is contained in:
Thomas Krijnen
2023-01-11 12:47:13 +01:00
parent ac3c4cac89
commit 4a71ab9631
2 changed files with 3 additions and 2 deletions
@@ -8,6 +8,7 @@ import functools
import itertools
import ifcopenshell.express
import ifcopenshell.express.express_parser
import networkx as nx
@@ -331,7 +332,7 @@ def calc_{class_name}_{str(derived_attr.attribute_decl.redeclared_attribute.qual
def process_domain_rule(context):
return f"""
assert {context.expression}
assert ({context.expression}) is not False
"""
def process_expression(context):
@@ -7,7 +7,7 @@ from codegen import indent
def reverse_compile(s):
return s.strip().replace("len(", "SIZEOF(").replace("assert ", "")
return s.strip().replace("len(", "SIZEOF(").replace("assert ", "").replace(" is not False", "")
@dataclass