From a46a852cd802d939937a5753433f07f2e87cec95 Mon Sep 17 00:00:00 2001 From: Luca Carniato Date: Mon, 2 Sep 2024 14:37:13 +0200 Subject: [PATCH] Fix linting --- tests/test_mesh2d_basics.py | 26 +++++++++----------------- 1 file changed, 9 insertions(+), 17 deletions(-) diff --git a/tests/test_mesh2d_basics.py b/tests/test_mesh2d_basics.py index 5f8ce196..95217795 100644 --- a/tests/test_mesh2d_basics.py +++ b/tests/test_mesh2d_basics.py @@ -13,12 +13,12 @@ InterpolationValues, MakeGridParameters, Mesh2d, + Mesh2dLocation, MeshKernel, MeshKernelError, MeshRefinementParameters, ProjectionType, RefinementType, - Mesh2dLocation, ) cases_projection_constructor = [(ProjectionType.CARTESIAN), (ProjectionType.SPHERICAL)] @@ -2309,24 +2309,15 @@ def test_mesh2d_deletion_and_get_orthogonality( def test_mesh2d_get_filtered_face_polygons(): - """Test mesh2d_get_filtered_face_polygons, getting the polygons of faces with all edges having bad orthogonality values - """ + """ mk = MeshKernel() - edge_nodes = np.array([0, 1, - 1, 2, - 2, 3, - 0, 3, - 1, 4, - 0, 4, - 0, 5, - 3, 5, - 3, 6, - 2, 6, - 2, 7, - 1, 7], dtype=np.int32) + edge_nodes = np.array( + [0, 1, 1, 2, 2, 3, 0, 3, 1, 4, 0, 4, 0, 5, 3, 5, 3, 6, 2, 6, 2, 7, 1, 7], + dtype=np.int32, + ) node_x = np.array([57.0, 49.1, 58.9, 66.7, 48.8, 65.9, 67.0, 49.1], dtype=np.double) node_y = np.array([23.6, 14.0, 6.9, 16.2, 23.4, 24.0, 7.2, 6.7], dtype=np.double) @@ -2334,11 +2325,12 @@ def test_mesh2d_get_filtered_face_polygons(): input_mesh2d = Mesh2d(node_x, node_y, edge_nodes) mk.mesh2d_set(input_mesh2d) - face_polygons = mk.mesh2d_get_filtered_face_polygons(Mesh2d.Property.ORTHOGONALITY, 0.04, 1.0) + face_polygons = mk.mesh2d_get_filtered_face_polygons( + Mesh2d.Property.ORTHOGONALITY, 0.04, 1.0 + ) expected_coordinates_x = np.array([57.0, 49.1, 58.9, 66.7, 57.0], dtype=np.double) expected_coordinates_y = np.array([23.6, 14.0, 6.9, 16.2, 23.6], dtype=np.double) assert face_polygons.x_coordinates == approx(expected_coordinates_x, abs=1e-6) assert face_polygons.y_coordinates == approx(expected_coordinates_y, abs=1e-6) -