From c3942e6a651f0d39167246561b295c2db7f8c779 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 25 Jul 2023 03:47:57 +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.0.278 → v0.0.280](https://github.com/astral-sh/ruff-pre-commit/compare/v0.0.278...v0.0.280) --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index cd2658ab4..9ed4b5920 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -23,7 +23,7 @@ repos: - id: black-jupyter - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.0.278 + rev: v0.0.280 hooks: - id: ruff args: ["--fix"] From c4a30a50f66fdc9916c72612659992f5c5237aba Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 25 Jul 2023 03:48:18 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- dpdata/cp2k/cell.py | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git a/dpdata/cp2k/cell.py b/dpdata/cp2k/cell.py index 7f5f3ef0e..7af73353e 100644 --- a/dpdata/cp2k/cell.py +++ b/dpdata/cp2k/cell.py @@ -28,24 +28,18 @@ def cell_to_low_triangle(A, B, C, alpha, beta, gamma): """ if not np.pi * 5 / 180 < alpha < np.pi * 175 / 180: raise RuntimeError( - "alpha=={}: must be a radian, and \ - must be in np.pi*5/180 < alpha < np.pi*175/180".format( - alpha - ) + f"alpha=={alpha}: must be a radian, and \ + must be in np.pi*5/180 < alpha < np.pi*175/180" ) if not np.pi * 5 / 180 < beta < np.pi * 175 / 180: raise RuntimeError( - "beta=={}: must be a radian, and \ - must be in np.pi*5/180 < beta < np.pi*175/180".format( - beta - ) + f"beta=={beta}: must be a radian, and \ + must be in np.pi*5/180 < beta < np.pi*175/180" ) if not np.pi * 5 / 180 < gamma < np.pi * 175 / 180: raise RuntimeError( - "gamma=={}: must be a radian, and \ - must be in np.pi*5/180 < gamma < np.pi*175/180".format( - gamma - ) + f"gamma=={gamma}: must be a radian, and \ + must be in np.pi*5/180 < gamma < np.pi*175/180" ) if not A > 0.2: raise RuntimeError(f"A=={A}, must be greater than 0.2")