From 865ca4cd5544d77d906720feecf00bc03d4fc917 Mon Sep 17 00:00:00 2001 From: Dunedan Date: Sat, 25 Jul 2026 22:01:35 +0200 Subject: [PATCH] Update the pre-commit hooks --- .pre-commit-config.yaml | 10 +++++----- ruff.toml | 1 + source/tools/entity/checkrefs.py | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a980dcf2b0..96cccf4dd6 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -34,7 +34,7 @@ repos: \.patch$ ) - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.12.9 + rev: v0.16.0 hooks: - id: ruff-check args: @@ -56,7 +56,7 @@ repos: files: ^binaries/ exclude: (^binaries/data/mods/(mod|public)/art/.*\.xml|\.dae$) - repo: https://github.com/scop/pre-commit-shfmt - rev: v3.12.0-2 + rev: v3.13.1-1 hooks: - id: shfmt args: @@ -67,7 +67,7 @@ repos: hooks: - id: shellcheck - repo: https://github.com/igorshubovych/markdownlint-cli - rev: v0.45.0 + rev: v0.47.0 hooks: - id: markdownlint language_version: 22.14.0 @@ -77,13 +77,13 @@ repos: ^source/third_party/ ) - repo: https://github.com/adrienverge/yamllint - rev: v1.37.1 + rev: v1.38.0 hooks: - id: yamllint args: - --strict - repo: https://github.com/eslint/eslint - rev: v9.39.2 + rev: v10.8.0 hooks: - id: eslint language_version: 22.14.0 diff --git a/ruff.toml b/ruff.toml index 7a026a8436..126082c3b6 100644 --- a/ruff.toml +++ b/ruff.toml @@ -33,6 +33,7 @@ ignore = [ "ANN", "C90", "COM812", + "CPY001", "D10", "EM", "FIX002", diff --git a/source/tools/entity/checkrefs.py b/source/tools/entity/checkrefs.py index 05b2e7f196..19beb1daa6 100755 --- a/source/tools/entity/checkrefs.py +++ b/source/tools/entity/checkrefs.py @@ -273,7 +273,7 @@ class CheckRefs: (version,) = unpack(int_fmt, f.read(int_len)) if version != 7: raise ValueError(f"Invalid PMP version ({version}) in '{ffp}'") - (datasize,) = unpack(int_fmt, f.read(int_len)) + (datasize,) = unpack(int_fmt, f.read(int_len)) # noqa: RUF059 (mapsize,) = unpack(int_fmt, f.read(int_len)) f.seek(2 * (mapsize * 16 + 1) * (mapsize * 16 + 1), 1) # skip heightmap (numtexs,) = unpack(int_fmt, f.read(int_len))