diff --git a/src/blenderbim/blenderbim/bim/module/model/product.py b/src/blenderbim/blenderbim/bim/module/model/product.py index 837c74f364..6599825048 100644 --- a/src/blenderbim/blenderbim/bim/module/model/product.py +++ b/src/blenderbim/blenderbim/bim/module/model/product.py @@ -39,7 +39,7 @@ from blenderbim.bim.module.model.data import AuthoringData from mathutils import Vector, Matrix from bpy_extras.object_utils import AddObjectHelper import json -from typing import Any, Union, Optional, assert_never +from typing import Any, Union, Optional class EnableAddType(bpy.types.Operator, tool.Ifc.Operator): diff --git a/src/blenderbim/blenderbim/tool/material.py b/src/blenderbim/blenderbim/tool/material.py index a6a667b732..31c1054e48 100644 --- a/src/blenderbim/blenderbim/tool/material.py +++ b/src/blenderbim/blenderbim/tool/material.py @@ -27,7 +27,7 @@ import blenderbim.bim.helper import ifcopenshell.util.unit import ifcopenshell.util.element from collections import defaultdict -from typing import Union, Any, TYPE_CHECKING, Optional, assert_never +from typing import Union, Any, TYPE_CHECKING, Optional if TYPE_CHECKING: # Avoid circular imports. @@ -341,7 +341,7 @@ class Material(blenderbim.core.tool.Material): elif material_type == "IfcMaterialList": assert False, "Current assign_material implementation requires 'material' argument for IfcMaterialList." else: - assert_never(material_type) + assert False, f"Invalid material type found: {material_type}" for element in elements[:]: if element.is_a("IfcElementType"): diff --git a/src/blenderbim/blenderbim/tool/style.py b/src/blenderbim/blenderbim/tool/style.py index f3f0b7985c..fc0de8849f 100644 --- a/src/blenderbim/blenderbim/tool/style.py +++ b/src/blenderbim/blenderbim/tool/style.py @@ -25,7 +25,7 @@ import blenderbim.core.tool import blenderbim.tool as tool import blenderbim.bim.helper from mathutils import Color -from typing import Union, Any, Optional, Literal, assert_never +from typing import Union, Any, Optional, Literal # fmt: off TEXTURE_MAPS_BY_METHODS = { @@ -662,7 +662,7 @@ class Style(blenderbim.core.tool.Style): if rendering_style and texture_style: tool.Loader.create_surface_style_with_textures(blender_material, rendering_style, texture_style) else: - assert_never(style_type) + assert False, f"Invalid style type found: {style_type}" @classmethod def rename_style(cls, style: ifcopenshell.entity_instance, name: str) -> None: