From e96e72e79c01454d8c93b9c06acc3a6f2d0ea077 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 13 Jan 2025 22:12:02 +0000 Subject: [PATCH 1/2] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/astral-sh/ruff-pre-commit: v0.8.4 → v0.9.1](https://github.com/astral-sh/ruff-pre-commit/compare/v0.8.4...v0.9.1) - [github.com/pre-commit/mirrors-mypy: v1.14.0 → v1.14.1](https://github.com/pre-commit/mirrors-mypy/compare/v1.14.0...v1.14.1) --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 11f8f0f..cd008c3 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -14,7 +14,7 @@ repos: - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: 'v0.8.4' + rev: 'v0.9.1' hooks: # Run the linter. - id: ruff @@ -30,7 +30,7 @@ repos: - id: add-trailing-comma - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.14.0 + rev: v1.14.1 hooks: - id: mypy From 144b0d222e3cbac0853756dffdacdf5ce3861337 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 13 Jan 2025 22:12:32 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- src/fenicsx_pulse/utils.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/fenicsx_pulse/utils.py b/src/fenicsx_pulse/utils.py index d02263c..e02a038 100644 --- a/src/fenicsx_pulse/utils.py +++ b/src/fenicsx_pulse/utils.py @@ -28,9 +28,9 @@ def vertex_to_dofmap(V: dolfinx.fem.FunctionSpace) -> npt.NDArray[np.int32]: num_vertices = mesh.topology.index_map(0).size_local + mesh.topology.index_map(0).num_ghosts c_to_v = mesh.topology.connectivity(mesh.topology.dim, 0) - assert ( - c_to_v.offsets[1:] - c_to_v.offsets[:-1] == c_to_v.offsets[1] - ).all(), "Single cell type supported" + assert (c_to_v.offsets[1:] - c_to_v.offsets[:-1] == c_to_v.offsets[1]).all(), ( + "Single cell type supported" + ) vertex_to_dof_map = np.empty(num_vertices, dtype=np.int32) vertex_to_dof_map[c_to_v.array] = V.dofmap.list[:, dof_layout].reshape(-1)