From bcec7fd6a263cd2e7f68965a8d2c9fb612223073 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 23 Oct 2023 20:19:11 +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/psf/black: 23.9.1 → 23.10.0](https://github.com/psf/black/compare/23.9.1...23.10.0) - [github.com/astral-sh/ruff-pre-commit: v0.0.292 → v0.1.1](https://github.com/astral-sh/ruff-pre-commit/compare/v0.0.292...v0.1.1) --- .pre-commit-config.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c461a1e84..ca94baf59 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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"] From 20af844e00433978a590f157b414ce665fc92160 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 23 Oct 2023 20:20:04 +0000 Subject: [PATCH 2/2] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- dpdata/system.py | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/dpdata/system.py b/dpdata/system.py index f1273104e..a75e0e880 100644 --- a/dpdata/system.py +++ b/dpdata/system.py @@ -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 = [