From 228bbc30adf84b1f8487e6612b7436ccf8931d5b Mon Sep 17 00:00:00 2001 From: Blender Defender Date: Fri, 26 Jul 2024 11:18:38 +0200 Subject: [PATCH] refactor: Update code comments and docstrings --- src/blenderbim/blenderbim/bim/module/patch/operator.py | 3 ++- src/ifcpatch/ifcpatch/recipes/ConvertLengthUnit.py | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/blenderbim/blenderbim/bim/module/patch/operator.py b/src/blenderbim/blenderbim/bim/module/patch/operator.py index 7f805f930e..d0bf9b1bd6 100644 --- a/src/blenderbim/blenderbim/bim/module/patch/operator.py +++ b/src/blenderbim/blenderbim/bim/module/patch/operator.py @@ -136,7 +136,8 @@ class UpdateIfcPatchArguments(bpy.types.Operator): if new_attr.data_type == "enum": new_attr.enum_items = json.dumps(arg_info.get("enum_items", [])) new_attr.enum_value = arg_info.get("default", new_attr.get_value_default()) - continue # Temporary workaround, because the Argument class resets the type to "string" when calling `set_value` + continue + new_attr.set_value(arg_info.get("default", new_attr.get_value_default())) return {"FINISHED"} diff --git a/src/ifcpatch/ifcpatch/recipes/ConvertLengthUnit.py b/src/ifcpatch/ifcpatch/recipes/ConvertLengthUnit.py index 218c952509..c555a2035e 100644 --- a/src/ifcpatch/ifcpatch/recipes/ConvertLengthUnit.py +++ b/src/ifcpatch/ifcpatch/recipes/ConvertLengthUnit.py @@ -64,7 +64,7 @@ class Patcher: Allowed imperial units include INCH, FOOT, MILE. :param unit: The name of the desired unit, defaults to "METER" - :type unit: str + :type unit: LengthUnit Example: