Skip to content

Commit

Permalink
[pre-commit.ci] pre-commit autoupdate (deepmodeling#559)
Browse files Browse the repository at this point in the history
<!--pre-commit.ci start-->
updates:
- [github.com/psf/black: 23.9.1 →
23.10.0](psf/black@23.9.1...23.10.0)
- [github.com/astral-sh/ruff-pre-commit: v0.0.292 →
v0.1.1](astral-sh/ruff-pre-commit@v0.0.292...v0.1.1)
<!--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] authored Oct 24, 2023
1 parent dbe2bc9 commit 36d1e2e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ repos:
- id: check-toml
# Python
- repo: https://github.com/psf/black
rev: 23.9.1
rev: 23.10.0
hooks:
- id: black-jupyter
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.0.292
rev: v0.1.1
hooks:
- id: ruff
args: ["--fix"]
Expand Down
6 changes: 1 addition & 5 deletions dpdata/system.py
Original file line number Diff line number Diff line change
Expand Up @@ -752,11 +752,7 @@ def replace(self, initial_atom_type, end_atom_type, replace_num):

if replace_num > max_replace_num:
raise RuntimeError(
"not enough {initial_atom_type} atom, only {max_replace_num} available, less than {replace_num}.Please check.".format(
initial_atom_type=initial_atom_type,
max_replace_num=max_replace_num,
replace_num=replace_num,
)
f"not enough {initial_atom_type} atom, only {max_replace_num} available, less than {replace_num}.Please check."
)

may_replace_indices = [
Expand Down

0 comments on commit 36d1e2e

Please sign in to comment.