From b63d9090a115be5d6d0817e393e6edab874ae931 Mon Sep 17 00:00:00 2001 From: Andrej730 Date: Mon, 24 Mar 2025 11:36:36 +0500 Subject: [PATCH] black . --- src/bonsai/bonsai/bim/module/drawing/helper.py | 2 +- src/bonsai/bonsai/bim/module/geometry/__init__.py | 2 +- src/bonsai/test/tool/test_loader.py | 12 ++++++------ 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/bonsai/bonsai/bim/module/drawing/helper.py b/src/bonsai/bonsai/bim/module/drawing/helper.py index b1706cffa7..91149b639d 100644 --- a/src/bonsai/bonsai/bim/module/drawing/helper.py +++ b/src/bonsai/bonsai/bim/module/drawing/helper.py @@ -202,7 +202,7 @@ def format_distance( base = int(precision) decInches = value * toInches - decFeet = decInches/12 + decFeet = decInches / 12 # Separate ft and inches # Unless Inches are the specified Length Unit or unit_fraction is False diff --git a/src/bonsai/bonsai/bim/module/geometry/__init__.py b/src/bonsai/bonsai/bim/module/geometry/__init__.py index f6ecfd2cf8..47dcaeddce 100644 --- a/src/bonsai/bonsai/bim/module/geometry/__init__.py +++ b/src/bonsai/bonsai/bim/module/geometry/__init__.py @@ -104,7 +104,7 @@ def block_scale(scene: bpy.types.Scene) -> None: if obj := (getattr(bpy.context, "active_object", None) or bpy.context.view_layer.objects.active): if isinstance(obj, bpy.types.Object) and tool.Blender.get_ifc_definition_id(obj): - if obj.type == 'CAMERA': + if obj.type == "CAMERA": camera = tool.Ifc.get_entity(obj) if ifcopenshell.util.element.get_pset(camera, "EPset_Drawing", "TargetView") == "REFLECTED_PLAN_VIEW": obj.scale = (-1, -1, -1) diff --git a/src/bonsai/test/tool/test_loader.py b/src/bonsai/test/tool/test_loader.py index 094fa8648f..abb3473245 100644 --- a/src/bonsai/test/tool/test_loader.py +++ b/src/bonsai/test/tool/test_loader.py @@ -555,7 +555,7 @@ class TestCreatePointCloudMesh(NewFile): def test_cartesian_point_list_3d(self): bpy.ops.bim.create_project() ifc_file = tool.Ifc.get() - coords = ((1., 2., 3.), (4., 5., 6.)) + coords = ((1.0, 2.0, 3.0), (4.0, 5.0, 6.0)) item = ifc_file.createIfcCartesianPointList3D(coords) rep = ifc_file.createIfcShapeRepresentation(Items=[item]) mesh = subject.create_point_cloud_mesh(rep) @@ -566,8 +566,8 @@ class TestCreatePointCloudMesh(NewFile): def test_cartesian_point_list_2d(self): bpy.ops.bim.create_project() ifc_file = tool.Ifc.get() - coords = ((1., 2.), (4., 5.)) - coords3d = ((1., 2., 0.), (4., 5., 0.)) + coords = ((1.0, 2.0), (4.0, 5.0)) + coords3d = ((1.0, 2.0, 0.0), (4.0, 5.0, 0.0)) item = ifc_file.createIfcCartesianPointList2D(coords) rep = ifc_file.createIfcShapeRepresentation(Items=[item]) mesh = subject.create_point_cloud_mesh(rep) @@ -578,7 +578,7 @@ class TestCreatePointCloudMesh(NewFile): def test_point_3d(self): bpy.ops.bim.create_project() ifc_file = tool.Ifc.get() - coords = ((1., 2., 0.),) + coords = ((1.0, 2.0, 0.0),) item = ifc_file.createIfcCartesianPoint(Coordinates=coords[0]) rep = ifc_file.createIfcShapeRepresentation(Items=[item]) mesh = subject.create_point_cloud_mesh(rep) @@ -589,8 +589,8 @@ class TestCreatePointCloudMesh(NewFile): def test_point_2d(self): bpy.ops.bim.create_project() ifc_file = tool.Ifc.get() - coords = ((1., 2.),) - coords3d = ((1., 2., 0.),) + coords = ((1.0, 2.0),) + coords3d = ((1.0, 2.0, 0.0),) item = ifc_file.createIfcCartesianPoint(Coordinates=coords[0]) rep = ifc_file.createIfcShapeRepresentation(Items=[item]) mesh = subject.create_point_cloud_mesh(rep)