Skip to content

Commit

Permalink
[pre-commit.ci] pre-commit autoupdate (#506)
Browse files Browse the repository at this point in the history
<!--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>
  • Loading branch information
pre-commit-ci[bot] committed Jul 25, 2023
1 parent b61144f commit 9ef8daf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 13 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down
18 changes: 6 additions & 12 deletions dpdata/cp2k/cell.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 9ef8daf

Please sign in to comment.