mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 09:48:32 +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 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
|
||||
|
||||
Reference in New Issue
Block a user