From 7b4fa6b5c0fe3c838ee2e29a840de1a7fbf4f1a3 Mon Sep 17 00:00:00 2001 From: Andrej730 Date: Mon, 27 Jan 2025 16:07:19 +0500 Subject: [PATCH] black . --- src/bonsai/bonsai/bim/module/layer/operator.py | 4 ++-- src/bonsai/bonsai/tool/model.py | 8 ++++++-- src/ifcopenshell-python/test/util/test_unit.py | 12 +++++++++--- 3 files changed, 17 insertions(+), 7 deletions(-) diff --git a/src/bonsai/bonsai/bim/module/layer/operator.py b/src/bonsai/bonsai/bim/module/layer/operator.py index e73f043912..8b1c1a3d39 100644 --- a/src/bonsai/bonsai/bim/module/layer/operator.py +++ b/src/bonsai/bonsai/bim/module/layer/operator.py @@ -149,7 +149,7 @@ class AssignPresentationLayer(bpy.types.Operator, tool.Ifc.Operator): **{ "items": [self.file.by_id(item.BIMMeshProperties.ifc_definition_id)], "layer": self.file.by_id(self.layer), - } + }, ) return {"FINISHED"} @@ -171,7 +171,7 @@ class UnassignPresentationLayer(bpy.types.Operator, tool.Ifc.Operator): **{ "items": [self.file.by_id(item.BIMMeshProperties.ifc_definition_id)], "layer": self.file.by_id(self.layer), - } + }, ) return {"FINISHED"} diff --git a/src/bonsai/bonsai/tool/model.py b/src/bonsai/bonsai/tool/model.py index ad45b0139a..cb0cca499d 100644 --- a/src/bonsai/bonsai/tool/model.py +++ b/src/bonsai/bonsai/tool/model.py @@ -676,8 +676,12 @@ class Model(bonsai.core.tool.Model): (obj.matrix_world @ Vector((max_x, layers["offset"], 0.0))).to_2d(), ], "side": [ - (obj.matrix_world @ Vector((min_x, layers["offset"] + (layers["thickness"] * direction), 0.0))).to_2d(), - (obj.matrix_world @ Vector((max_x, layers["offset"] + (layers["thickness"] * direction), 0.0))).to_2d(), + ( + obj.matrix_world @ Vector((min_x, layers["offset"] + (layers["thickness"] * direction), 0.0)) + ).to_2d(), + ( + obj.matrix_world @ Vector((max_x, layers["offset"] + (layers["thickness"] * direction), 0.0)) + ).to_2d(), ], } axes["reference"] = [ diff --git a/src/ifcopenshell-python/test/util/test_unit.py b/src/ifcopenshell-python/test/util/test_unit.py index b8a31f70c0..9e554d175b 100644 --- a/src/ifcopenshell-python/test/util/test_unit.py +++ b/src/ifcopenshell-python/test/util/test_unit.py @@ -106,12 +106,18 @@ class TestGetPropertyUnit(test.bootstrap.IFC4): length2 = ifcopenshell.api.unit.add_si_unit(self.file, unit_type="LENGTHUNIT", prefix="CENTI") area = ifcopenshell.api.unit.add_si_unit(self.file, unit_type="AREAUNIT") ifcopenshell.api.unit.assign_unit(self.file, units=[length, area]) - prop = self.file.createIfcPropertyEnumeratedValue(Name="Foo", EnumerationValues=[self.file.createIfcLengthMeasure(42.0)]) + prop = self.file.createIfcPropertyEnumeratedValue( + Name="Foo", EnumerationValues=[self.file.createIfcLengthMeasure(42.0)] + ) assert subject.get_property_unit(prop, self.file) == length prop.EnumerationValues = [] - prop.EnumerationReference = self.file.createIfcPropertyEnumeration("Foo", [self.file.createIfcAreaMeasure(42.0)]) + prop.EnumerationReference = self.file.createIfcPropertyEnumeration( + "Foo", [self.file.createIfcAreaMeasure(42.0)] + ) assert subject.get_property_unit(prop, self.file) == area - prop.EnumerationReference = self.file.createIfcPropertyEnumeration("Foo", [self.file.createIfcAreaMeasure(42.0)], Unit=length2) + prop.EnumerationReference = self.file.createIfcPropertyEnumeration( + "Foo", [self.file.createIfcAreaMeasure(42.0)], Unit=length2 + ) assert subject.get_property_unit(prop, self.file) == length2 prop.EnumerationValues = [self.file.createIfcAreaMeasure(42.0)] assert subject.get_property_unit(prop, self.file) == length2