Skip to content

Commit

Permalink
Merge pull request #1982 from glotzerlab/pre-commit-ci-update-config
Browse files Browse the repository at this point in the history
[pre-commit.ci] pre-commit autoupdate
  • Loading branch information
joaander authored Jan 6, 2025
2 parents 8f5fd7b + 83603ed commit f0415ec
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,14 @@ repos:
hooks:
- id: nbstripout
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: 'v0.8.0'
rev: 'v0.8.6'
hooks:
- id: ruff-format
types_or: [python]
- id: ruff
types_or: [python]
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v19.1.4
rev: v19.1.6
hooks:
- id: clang-format
types_or: [c, c++, cuda, inc]
Expand Down
12 changes: 8 additions & 4 deletions hoomd/md/update.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,8 +197,10 @@ def _to_lowercase(self, letter):

def _preprocess_n_slabs(self, n_slabs):
if n_slabs < 0:
raise ValueError(f"The number of slabs is negative, \
n_slabs = {n_slabs}")
raise ValueError(
f"The number of slabs is negative, \
n_slabs = {n_slabs}"
)
return n_slabs

def _preprocess_max_slab(self, max_slab):
Expand All @@ -214,8 +216,10 @@ def _preprocess_min_slab(self, min_slab):
if min_slab <= -1 or min_slab > self.n_slabs:
raise ValueError(f"Invalid min_slab of {min_slab}")
if min_slab == self.max_slab:
raise ValueError(f"Min and max slab are equal. \
min_slab = max_slab = {min_slab}")
raise ValueError(
f"Min and max slab are equal. \
min_slab = max_slab = {min_slab}"
)
return min_slab

def _attach_hook(self):
Expand Down

0 comments on commit f0415ec

Please sign in to comment.