black format

This commit is contained in:
Andrej730
2024-08-27 17:31:41 +05:00
parent d2efb2ab78
commit 002c50e29d
2 changed files with 3 additions and 1 deletions
@@ -289,7 +289,7 @@ class SelectDecomposedElements(bpy.types.Operator, tool.Ifc.Operator):
ifc_class=ifc_class, ifc_class=ifc_class,
relating_type=relating_type, relating_type=relating_type,
is_untyped=is_untyped, is_untyped=is_untyped,
element_filter = element_filter element_filter=element_filter,
) )
+2
View File
@@ -257,6 +257,7 @@ class Spatial(bonsai.core.tool.Spatial):
keyword: str | None, keyword: str | None,
) -> filter[ifcopenshell.entity_instance]: ) -> filter[ifcopenshell.entity_instance]:
keyword = keyword.lower() if keyword else keyword keyword = keyword.lower() if keyword else keyword
def filter_element(element): def filter_element(element):
if ifc_class: if ifc_class:
if not element.is_a(ifc_class): if not element.is_a(ifc_class):
@@ -273,6 +274,7 @@ class Spatial(bonsai.core.tool.Spatial):
if keyword not in f"{element.is_a()} {type_name}".lower(): if keyword not in f"{element.is_a()} {type_name}".lower():
return False return False
return True return True
return filter(filter_element, elements) return filter(filter_element, elements)
@classmethod @classmethod