From e77c507600e15b94d41ae1a4cb1e13af6fe56847 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 9 Dec 2024 20:59:33 +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/pre-commit/pre-commit-hooks: v4.5.0 → v5.0.0](https://github.com/pre-commit/pre-commit-hooks/compare/v4.5.0...v5.0.0) - [github.com/psf/black: 23.11.0 → 24.10.0](https://github.com/psf/black/compare/23.11.0...24.10.0) - [github.com/astral-sh/ruff-pre-commit: v0.1.6 → v0.8.2](https://github.com/astral-sh/ruff-pre-commit/compare/v0.1.6...v0.8.2) - [github.com/codespell-project/codespell: v2.2.6 → v2.3.0](https://github.com/codespell-project/codespell/compare/v2.2.6...v2.3.0) --- .pre-commit-config.yaml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index cd67591..86f147a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -11,7 +11,7 @@ ci: repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: "v4.5.0" + rev: "v5.0.0" hooks: - id: check-added-large-files - id: check-case-conflict @@ -28,19 +28,19 @@ repos: - id: trailing-whitespace - repo: https://github.com/psf/black - rev: "23.11.0" + rev: "24.10.0" hooks: - id: black args: [--line-length=79] - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.1.6 + rev: v0.8.2 hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] - repo: https://github.com/codespell-project/codespell - rev: v2.2.6 + rev: v2.3.0 hooks: - id: codespell args: [-w] From d6a73945c6ddfd8ad650a951d99fd399222f8c5c Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 9 Dec 2024 20:59:42 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- feigen/_base.py | 1 + feigen/bspline.py | 12 ++++++------ feigen/comm.py | 1 + feigen/jacobian_determinant.py | 6 +++--- feigen/nurbs_weights.py | 6 +++--- feigen/poisson2d.py | 6 +++--- 6 files changed, 17 insertions(+), 15 deletions(-) diff --git a/feigen/_base.py b/feigen/_base.py index 58a2649..cfa76f6 100644 --- a/feigen/_base.py +++ b/feigen/_base.py @@ -1,6 +1,7 @@ """ Base type of feigen """ + from feigen import log diff --git a/feigen/bspline.py b/feigen/bspline.py index d1cf309..17f292b 100644 --- a/feigen/bspline.py +++ b/feigen/bspline.py @@ -302,9 +302,9 @@ def __init__(self, uri, degree=None, ncoeffs=None): # noqa PLR0915 # plotter initialization constants self._config["dim"] = 2 # 2D - self._config[ - "n_subplots" - ] = 3 # geometry, boundary condition, server response + self._config["n_subplots"] = ( + 3 # geometry, boundary condition, server response + ) self._config["geometry_plot"] = 0 self._config["bc_plot"] = 1 self._config["server_plot"] = 2 @@ -667,9 +667,9 @@ def _iganet_sync(self, evt): # noqa ARG002 eval_points = vedo.Points(np.vstack(geo_eval).T, c="white") eval_point_ids = eval_points.labels("id", on="points", font="VTK") self._state["server_plot_actors"]["evaluated_points"] = eval_points - self._state["server_plot_actors"][ - "evaluated_point_ids" - ] = eval_point_ids.c("grey") + self._state["server_plot_actors"]["evaluated_point_ids"] = ( + eval_point_ids.c("grey") + ) # for some reason add won't work here self.show( diff --git a/feigen/comm.py b/feigen/comm.py index 6191465..ee69d9f 100644 --- a/feigen/comm.py +++ b/feigen/comm.py @@ -1,6 +1,7 @@ """ Communication helpers. """ + import uuid from websockets.exceptions import ConnectionClosed diff --git a/feigen/jacobian_determinant.py b/feigen/jacobian_determinant.py index f10964f..ccfd5cd 100644 --- a/feigen/jacobian_determinant.py +++ b/feigen/jacobian_determinant.py @@ -92,9 +92,9 @@ def __init__(self, spline=None): # noqa PLR0915 # plotter initialization constants self._c["dim"] = 2 # 2D - self._c[ - "n_subplots" - ] = 2 # geometry, boundary condition, server response + self._c["n_subplots"] = ( + 2 # geometry, boundary condition, server response + ) self._c["geometry_plot"] = 0 self._c["server_plot"] = 1 diff --git a/feigen/nurbs_weights.py b/feigen/nurbs_weights.py index 1295d4a..91bea40 100644 --- a/feigen/nurbs_weights.py +++ b/feigen/nurbs_weights.py @@ -109,9 +109,9 @@ def __init__( # plotter initialization constants self._c["dim"] = 2 # 2D - self._c[ - "n_subplots" - ] = 2 # geometry, boundary condition, server response + self._c["n_subplots"] = ( + 2 # geometry, boundary condition, server response + ) self._c["geometry_plot"] = 0 self._c["server_plot"] = 1 diff --git a/feigen/poisson2d.py b/feigen/poisson2d.py index 12cad5c..ad199ed 100644 --- a/feigen/poisson2d.py +++ b/feigen/poisson2d.py @@ -318,9 +318,9 @@ def __init__(self, spline=None): # noqa PLR0915 # plotter initialization constants self._c["dim"] = 2 # 2D - self._c[ - "n_subplots" - ] = 3 # geometry, boundary condition, server response + self._c["n_subplots"] = ( + 3 # geometry, boundary condition, server response + ) self._c["geometry_plot"] = 0 self._c["bc_plot"] = 1 self._c["server_plot"] = 2