From 4bd3755565a37667457a7a7d079be5f347a551c4 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 6 Dec 2024 11:57:24 +0800 Subject: [PATCH] [pre-commit.ci] pre-commit autoupdate (#273) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/astral-sh/ruff-pre-commit: v0.7.2 → v0.8.1](https://github.com/astral-sh/ruff-pre-commit/compare/v0.7.2...v0.8.1) Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Signed-off-by: Frost Ming --- .pre-commit-config.yaml | 2 +- src/pdm/backend/hooks/version/scm.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 03dad61..dc46606 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -4,7 +4,7 @@ ci: exclude: ^src/pdm/backend/_vendor repos: - repo: https://github.com/astral-sh/ruff-pre-commit - rev: 'v0.7.2' + rev: 'v0.8.1' hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix, --show-fixes] diff --git a/src/pdm/backend/hooks/version/scm.py b/src/pdm/backend/hooks/version/scm.py index 481313b..1f496f4 100644 --- a/src/pdm/backend/hooks/version/scm.py +++ b/src/pdm/backend/hooks/version/scm.py @@ -268,7 +268,7 @@ def _bump_regex(version: str) -> str: match = re.match(r"(.*?)(\d+)$", version) assert match is not None prefix, tail = match.groups() - return "%s%d" % (prefix, int(tail) + 1) + return f"{prefix}{int(tail) + 1}" def hg_parse_version(root: StrPath, config: Config) -> SCMVersion | None: