diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 847c373446..e168af2c8d 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -30,13 +30,13 @@ repos: exclude: ^source/3rdparty - repo: https://github.com/astral-sh/ruff-pre-commit # Ruff version. - rev: v0.0.292 + rev: v0.1.1 hooks: - id: ruff args: ["--fix"] exclude: ^source/3rdparty - repo: https://github.com/psf/black-pre-commit-mirror - rev: 23.9.1 + rev: 23.10.0 hooks: - id: black-jupyter exclude: ^source/3rdparty @@ -54,7 +54,7 @@ repos: - id: blacken-docs # C++ - repo: https://github.com/pre-commit/mirrors-clang-format - rev: v17.0.2 + rev: v17.0.3 hooks: - id: clang-format exclude: ^source/3rdparty|source/lib/src/gpu/cudart/.+\.inc diff --git a/deepmd/entrypoints/train.py b/deepmd/entrypoints/train.py index bd7a2ac7ec..9469b7df90 100755 --- a/deepmd/entrypoints/train.py +++ b/deepmd/entrypoints/train.py @@ -406,9 +406,7 @@ def get_nbor_stat(jdata, rcut, one_type: bool = False): tmp_data.get_batch() assert ( tmp_data.get_type_map() - ), "In multi-task mode, 'type_map.raw' must be defined in data systems {}! ".format( - systems - ) + ), f"In multi-task mode, 'type_map.raw' must be defined in data systems {systems}! " if train_data is None: train_data = tmp_data else: