From e9be507788ac0e5643a6c68f463851d2bddeb0f1 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Tue, 24 Oct 2023 10:18:41 +0800 Subject: [PATCH] [pre-commit.ci] pre-commit autoupdate (#2944) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [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) - [github.com/psf/black-pre-commit-mirror: 23.9.1 → 23.10.0](https://github.com/psf/black-pre-commit-mirror/compare/23.9.1...23.10.0) - [github.com/pre-commit/mirrors-clang-format: v17.0.2 → v17.0.3](https://github.com/pre-commit/mirrors-clang-format/compare/v17.0.2...v17.0.3) --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> --- .pre-commit-config.yaml | 6 +++--- deepmd/entrypoints/train.py | 4 +--- 2 files changed, 4 insertions(+), 6 deletions(-) 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: