Skip to content

Commit 9ef8daf

Browse files
[pre-commit.ci] pre-commit autoupdate (#506)
<!--pre-commit.ci start--> updates: - [github.com/astral-sh/ruff-pre-commit: v0.0.278 → v0.0.280](astral-sh/ruff-pre-commit@v0.0.278...v0.0.280) <!--pre-commit.ci end--> --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent b61144f commit 9ef8daf

2 files changed

Lines changed: 7 additions & 13 deletions

File tree

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ repos:
2323
- id: black-jupyter
2424
- repo: https://github.com/astral-sh/ruff-pre-commit
2525
# Ruff version.
26-
rev: v0.0.278
26+
rev: v0.0.280
2727
hooks:
2828
- id: ruff
2929
args: ["--fix"]

dpdata/cp2k/cell.py

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -28,24 +28,18 @@ def cell_to_low_triangle(A, B, C, alpha, beta, gamma):
2828
"""
2929
if not np.pi * 5 / 180 < alpha < np.pi * 175 / 180:
3030
raise RuntimeError(
31-
"alpha=={}: must be a radian, and \
32-
must be in np.pi*5/180 < alpha < np.pi*175/180".format(
33-
alpha
34-
)
31+
f"alpha=={alpha}: must be a radian, and \
32+
must be in np.pi*5/180 < alpha < np.pi*175/180"
3533
)
3634
if not np.pi * 5 / 180 < beta < np.pi * 175 / 180:
3735
raise RuntimeError(
38-
"beta=={}: must be a radian, and \
39-
must be in np.pi*5/180 < beta < np.pi*175/180".format(
40-
beta
41-
)
36+
f"beta=={beta}: must be a radian, and \
37+
must be in np.pi*5/180 < beta < np.pi*175/180"
4238
)
4339
if not np.pi * 5 / 180 < gamma < np.pi * 175 / 180:
4440
raise RuntimeError(
45-
"gamma=={}: must be a radian, and \
46-
must be in np.pi*5/180 < gamma < np.pi*175/180".format(
47-
gamma
48-
)
41+
f"gamma=={gamma}: must be a radian, and \
42+
must be in np.pi*5/180 < gamma < np.pi*175/180"
4943
)
5044
if not A > 0.2:
5145
raise RuntimeError(f"A=={A}, must be greater than 0.2")

0 commit comments

Comments
 (0)