ty: detect unresolved references

This commit is contained in:
Andrej730
2026-07-18 20:35:10 +05:00
parent f744753726
commit b35f99e63f
99 changed files with 401 additions and 84 deletions
@@ -326,10 +326,11 @@ class iterator(ifcopenshell_wrapper.Iterator):
if include_or_exclude_type == {"entity_instance"}:
include_or_exclude = cast(set[entity_instance], include_or_exclude)
if not all((last_inst := inst).is_a("IfcProduct") for inst in include_or_exclude):
raise ValueError(
f"include and exclude need to be an aggregate of IfcProduct. Violating element: '{last_inst}'."
)
for inst in include_or_exclude:
if not inst.is_a("IfcProduct"):
raise ValueError(
f"include and exclude need to be an aggregate of IfcProduct. Violating element: '{inst}'."
)
initializer = ifcopenshell_wrapper.construct_iterator_with_include_exclude_id