diff --git a/src/bonsai/bonsai/bim/import_ifc.py b/src/bonsai/bonsai/bim/import_ifc.py index d5b489cad9..936547a212 100644 --- a/src/bonsai/bonsai/bim/import_ifc.py +++ b/src/bonsai/bonsai/bim/import_ifc.py @@ -86,7 +86,7 @@ class MaterialCreator: def parse_element_type_material_styles(self, element: ifcopenshell.entity_instance) -> None: if self.mesh["ios_materials"]: - return # Already has materials assign to the representation itself + return # Already has materials assign to the representation itself # Otherwise, we need to check for material styles on the element, since # create_shape on types only works on representations. context = tool.Ifc.get().by_id(self.mesh.BIMMeshProperties.ifc_definition_id).ContextOfItems diff --git a/src/bonsai/test/tool/test_geometry.py b/src/bonsai/test/tool/test_geometry.py index d36ccf59eb..223bd65fb5 100644 --- a/src/bonsai/test/tool/test_geometry.py +++ b/src/bonsai/test/tool/test_geometry.py @@ -174,7 +174,7 @@ class TestGetCartesianPointCoordinateOffset(NewFile): props = bpy.context.scene.BIMGeoreferenceProperties props.has_blender_offset = True obj.BIMObjectProperties.cartesian_point_offset = "1,2,3" - assert np.allclose(subject.get_cartesian_point_offset(obj), np.array((1., 2., 3.))) + assert np.allclose(subject.get_cartesian_point_offset(obj), np.array((1.0, 2.0, 3.0))) def test_get_null_if_not_a_cartesian_point_offset_type(self): obj = bpy.data.objects.new("Object", None) diff --git a/src/bonsai/test/tool/test_spatial.py b/src/bonsai/test/tool/test_spatial.py index cf16dfeb2b..2985b458d1 100644 --- a/src/bonsai/test/tool/test_spatial.py +++ b/src/bonsai/test/tool/test_spatial.py @@ -250,14 +250,16 @@ class TestGenerateSpace(NewFile): mesh = space.data assert isinstance(mesh, bpy.types.Mesh) assert len(mesh.vertices) == 8 - TEST_VERTS = sorted(( - ((5.0, 5.0, 10.0)), - ((-5.0, 5.0, 10.0)), - ((-5.0, -5.0, 10.0)), - ((5.0, -5.0, 10.0)), - ((-5.0, 5.0, 0.0)), - ((-5.0, -5.0, 0.0)), - ((5.0, 5.0, 0.0)), - ((5.0, -5.0, 0.0)), - )) + TEST_VERTS = sorted( + ( + ((5.0, 5.0, 10.0)), + ((-5.0, 5.0, 10.0)), + ((-5.0, -5.0, 10.0)), + ((5.0, -5.0, 10.0)), + ((-5.0, 5.0, 0.0)), + ((-5.0, -5.0, 0.0)), + ((5.0, 5.0, 0.0)), + ((5.0, -5.0, 0.0)), + ) + ) assert np.allclose(TEST_VERTS, sorted([tuple(v.co) for v in mesh.vertices])) diff --git a/src/bonsai/test/tool/test_system.py b/src/bonsai/test/tool/test_system.py index 1f676ba320..7b0dc9e0d1 100644 --- a/src/bonsai/test/tool/test_system.py +++ b/src/bonsai/test/tool/test_system.py @@ -52,7 +52,9 @@ class TestAddPorts(NewFile): for port, expected_matrix in zip(ports, expected_matrices, strict=True): port_matrix = tool.Model.get_element_matrix(port) port_matrix.translation *= si_conversion - assert np.allclose(port_matrix, expected_matrix, atol=1.0e-5), f"Matrix does not match:\n{port_matrix}\n{expected_matrix}" + assert np.allclose( + port_matrix, expected_matrix, atol=1.0e-5 + ), f"Matrix does not match:\n{port_matrix}\n{expected_matrix}" def test_run(self): # default use diff --git a/src/ifcpatch/test/test_Ifc2Sql.py b/src/ifcpatch/test/test_Ifc2Sql.py index c552e07945..3d20c8ba97 100644 --- a/src/ifcpatch/test/test_Ifc2Sql.py +++ b/src/ifcpatch/test/test_Ifc2Sql.py @@ -36,7 +36,11 @@ class TestIfc2Sql: TEST_FILE = Path(__file__).parent / "files" / "basic.ifc" tmp = tempfile.NamedTemporaryFile(delete=False, suffix=".ifcsqlite") sqlite_path = ifcpatch.execute( - {"file": ifcopenshell.open(TEST_FILE), "recipe": "Ifc2Sql", "arguments": ["sqlite", None, None, None, tmp.name]} + { + "file": ifcopenshell.open(TEST_FILE), + "recipe": "Ifc2Sql", + "arguments": ["sqlite", None, None, None, tmp.name], + } ) assert isinstance(sqlite_path, str) assert sqlite_path.endswith(".ifcsqlite")