diff --git a/src/bonsai/bonsai/bim/helper.py b/src/bonsai/bonsai/bim/helper.py index 62ded9d241..824aa91818 100644 --- a/src/bonsai/bonsai/bim/helper.py +++ b/src/bonsai/bonsai/bim/helper.py @@ -411,15 +411,11 @@ def draw_filter( if data.data["saved_searches"]: row.operator("bim.load_search", text="", icon="IMPORT").module = module row.operator("bim.save_search", text="", icon="EXPORT").module = module - if module != 'search': - if module == 'drawing_include': - row.operator("bim.edit_element_filter", icon="CHECKMARK", text="").filter_mode = ( - "INCLUDE" - ) - if module == 'drawing_exclude': - row.operator("bim.edit_element_filter", icon="CHECKMARK", text="").filter_mode = ( - "EXCLUDE" - ) + if module != "search": + if module == "drawing_include": + row.operator("bim.edit_element_filter", icon="CHECKMARK", text="").filter_mode = "INCLUDE" + if module == "drawing_exclude": + row.operator("bim.edit_element_filter", icon="CHECKMARK", text="").filter_mode = "EXCLUDE" row.operator("bim.enable_editing_element_filter", icon="CANCEL", text="").filter_mode = "NONE" row = layout.row(align=True) row.operator("bim.add_filter_group", text="Add Search Group", icon="ADD").module = module diff --git a/src/bonsai/bonsai/bim/module/drawing/operator.py b/src/bonsai/bonsai/bim/module/drawing/operator.py index 8c5a103746..abb60a00c6 100644 --- a/src/bonsai/bonsai/bim/module/drawing/operator.py +++ b/src/bonsai/bonsai/bim/module/drawing/operator.py @@ -3476,7 +3476,7 @@ class EnableEditingElementFilter(bpy.types.Operator, tool.Ifc.Operator): @classmethod def description(cls, context, properties): - if properties.filter_mode == 'NONE': + if properties.filter_mode == "NONE": return "Cancel filter" return "Enable editing options for the include or exclude filter" diff --git a/src/ifcopenshell-python/ifcopenshell/file.py b/src/ifcopenshell-python/ifcopenshell/file.py index 8f96a5be18..81503185ab 100644 --- a/src/ifcopenshell-python/ifcopenshell/file.py +++ b/src/ifcopenshell-python/ifcopenshell/file.py @@ -33,6 +33,7 @@ from typing import Union from typing import overload from typing import Literal from typing import TypedDict + # py39 compat: re-enable when support is dropped # from typing_extensions import assert_never