mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-23 14:16:22 +00:00
Fix ty disjoint-cast on geom/main.py
It was casting to `set`, while it's actually cannot be a set - both `include` and `exclude` can only be a list.
This commit is contained in:
@@ -345,7 +345,7 @@ class iterator(ifcopenshell_wrapper.iterator):
|
|||||||
include_or_exclude_type = set(x.__class__.__name__ for x in include_or_exclude)
|
include_or_exclude_type = set(x.__class__.__name__ for x in include_or_exclude)
|
||||||
|
|
||||||
if include_or_exclude_type == {"entity_instance"}:
|
if include_or_exclude_type == {"entity_instance"}:
|
||||||
include_or_exclude = cast(set[entity_instance], include_or_exclude)
|
include_or_exclude = cast(list[entity_instance], include_or_exclude)
|
||||||
|
|
||||||
for inst in include_or_exclude:
|
for inst in include_or_exclude:
|
||||||
if not inst.is_a("IfcProduct"):
|
if not inst.is_a("IfcProduct"):
|
||||||
|
|||||||
Reference in New Issue
Block a user