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"] 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 = [