From 68543c7f05a391084e862499cd4fe7d66f27841f Mon Sep 17 00:00:00 2001 From: Andrej730 Date: Fri, 31 Jan 2025 18:11:12 +0500 Subject: [PATCH] Simplify types used in debug module express methods #6071 --- src/bonsai/bonsai/tool/debug.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/bonsai/bonsai/tool/debug.py b/src/bonsai/bonsai/tool/debug.py index 76644eda48..0dd9b6c855 100644 --- a/src/bonsai/bonsai/tool/debug.py +++ b/src/bonsai/bonsai/tool/debug.py @@ -19,10 +19,9 @@ import os import json import bpy +import ifcopenshell.ifcopenshell_wrapper as W import ifcopenshell.api.material import ifcopenshell.express -import ifcopenshell.express.schema -import ifcopenshell.express.schema_class import ifcopenshell.util.element import ifcopenshell.util.schema import bonsai.core.style @@ -36,14 +35,14 @@ from typing import Iterable, Literal class Debug(bonsai.core.tool.Debug): @classmethod - def add_schema_identifier(cls, schema: ifcopenshell.express.schema_class.SchemaClass) -> None: - IfcStore.schema_identifiers.append(schema.schema_name) + def add_schema_identifier(cls, schema: W.schema_definition) -> None: + IfcStore.schema_identifiers.append(schema.name()) @classmethod - def load_express(cls, filename: str) -> ifcopenshell.express.schema_class.SchemaClass: + def load_express(cls, filename: str) -> W.schema_definition: schema = ifcopenshell.express.parse(filename) ifcopenshell.register_schema(schema) - return schema + return schema.schema @classmethod def purge_hdf5_cache(cls) -> None: