From 21474ebe5710ad318c4f0ed18af25833d2701be8 Mon Sep 17 00:00:00 2001 From: Alexandru Fikl Date: Fri, 9 Aug 2024 09:56:13 +0300 Subject: [PATCH] fix issues with ruff 0.5.7 --- meshmode/distributed.py | 2 +- pyproject.toml | 1 + test/test_firedrake_interop.py | 6 +++--- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/meshmode/distributed.py b/meshmode/distributed.py index df9e1de2..ad2a0049 100644 --- a/meshmode/distributed.py +++ b/meshmode/distributed.py @@ -377,7 +377,7 @@ def complete_some(self): group_factory=self.bdry_grp_factory), remote_group_infos=remote_group_infos)) - del self.pending_recv_identifiers[(local_part_id, remote_part_id)] + del self.pending_recv_identifiers[local_part_id, remote_part_id] assert not self.pending_recv_identifiers MPI.Request.waitall(self.send_reqs) diff --git a/pyproject.toml b/pyproject.toml index ae4a9d76..3d477fad 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -94,6 +94,7 @@ extend-select = [ "W", # pycodestyle ] extend-ignore = [ + "C409", # remove comprehension within tuple call "C90", # McCabe complexity "E226", # missing whitespace around arithmetic operator "E241", # multiple spaces after comma diff --git a/test/test_firedrake_interop.py b/test/test_firedrake_interop.py index bed5c46e..6aaaec02 100644 --- a/test/test_firedrake_interop.py +++ b/test/test_firedrake_interop.py @@ -420,7 +420,7 @@ def test_from_fd_transfer(actx_factory, fspace_degree, eoc_recorders = {(True, d): EOCRecorder() for d in range(dim)} if not only_convert_bdy: for d in range(dim): - eoc_recorders[(False, d)] = EOCRecorder() + eoc_recorders[False, d] = EOCRecorder() def get_fdrake_mesh_and_h_from_par(mesh_par): from firedrake import Mesh, UnitCubeMesh, UnitIntervalMesh, UnitSquareMesh @@ -500,7 +500,7 @@ def get_fdrake_mesh_and_h_from_par(mesh_par): # record fd -> mm error err = np.max(np.abs(fd2mm_f - meshmode_f)) - eoc_recorders[(True, d)].add_data_point(h, err) + eoc_recorders[True, d].add_data_point(h, err) if not only_convert_bdy: # now transport mm -> fd @@ -509,7 +509,7 @@ def get_fdrake_mesh_and_h_from_par(mesh_par): mm2fd_f = fdrake_connection.from_meshmode(meshmode_f_dofarr) # record mm -> fd error err = np.max(np.abs(fdrake_f.dat.data - mm2fd_f.dat.data)) - eoc_recorders[(False, d)].add_data_point(h, err) + eoc_recorders[False, d].add_data_point(h, err) # assert that order is correct or error is "low enough" for ((fd2mm, d), eoc_rec) in eoc_recorders.items():