mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-10-02 13:04:49 +00:00
#2685 Don't raise issues on WR evaluating to indeterminate
This commit is contained in:
@@ -8,6 +8,7 @@ import functools
|
|||||||
import itertools
|
import itertools
|
||||||
|
|
||||||
import ifcopenshell.express
|
import ifcopenshell.express
|
||||||
|
import ifcopenshell.express.express_parser
|
||||||
|
|
||||||
import networkx as nx
|
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):
|
def process_domain_rule(context):
|
||||||
return f"""
|
return f"""
|
||||||
assert {context.expression}
|
assert ({context.expression}) is not False
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def process_expression(context):
|
def process_expression(context):
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ from codegen import indent
|
|||||||
|
|
||||||
|
|
||||||
def reverse_compile(s):
|
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
|
@dataclass
|
||||||
|
|||||||
Reference in New Issue
Block a user