diff --git a/src/bonsai/bonsai/bim/module/bsdd/operator.py b/src/bonsai/bonsai/bim/module/bsdd/operator.py index 173adb7258..3ccfbe3452 100644 --- a/src/bonsai/bonsai/bim/module/bsdd/operator.py +++ b/src/bonsai/bonsai/bim/module/bsdd/operator.py @@ -22,6 +22,7 @@ import bonsai.tool as tool import ifcopenshell.api.pset import ifcopenshell.util.element from bonsai.core import bsdd as core +from typing import Any class LoadBSDDDictionaries(bpy.types.Operator): @@ -88,7 +89,7 @@ class AddBSDDProperties(bpy.types.Operator, tool.Ifc.Operator): self.file = tool.Ifc.get() bprops = tool.Bsdd.get_bsdd_props() - psets = {} + psets: dict[str, dict[str, Any]] = {} for selected_property in bprops.selected_properties: psets.setdefault(selected_property.metadata, {})[selected_property.name] = selected_property.get_value() diff --git a/src/bonsai/bonsai/bim/module/drawing/operator.py b/src/bonsai/bonsai/bim/module/drawing/operator.py index 57b1981e2c..d5a9a07097 100644 --- a/src/bonsai/bonsai/bim/module/drawing/operator.py +++ b/src/bonsai/bonsai/bim/module/drawing/operator.py @@ -2437,7 +2437,9 @@ class SaveDrawingStyle(bpy.types.Operator, tool.Ifc.Operator): style = {} eval_namespace = {"context": context, "scene": scene, "space": space} - def add_prop_to_style(prop_path, context, scene, space): + def add_prop_to_style( + prop_path: str, context: bpy.types.Context, scene: bpy.types.Scene, space: bpy.types.SpaceView3D + ) -> None: value = eval(prop_path) if not isinstance(value, str): try: diff --git a/src/ifcopenshell-python/ifcopenshell/api/pset/edit_pset.py b/src/ifcopenshell-python/ifcopenshell/api/pset/edit_pset.py index f863456466..286f9fc990 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/pset/edit_pset.py +++ b/src/ifcopenshell-python/ifcopenshell/api/pset/edit_pset.py @@ -320,7 +320,7 @@ class Usecase: return prop def add_new_properties(self) -> list[ifcopenshell.entity_instance]: - properties = [] + properties: list[ifcopenshell.entity_instance] = [] for name, value in self.settings["properties"].items(): if value is None and self.settings["should_purge"]: continue