From 462e04c5bef7065e307a6ae40857fa85a5c480a4 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 5 Jan 2026 20:59:30 +0000 Subject: [PATCH 1/8] [pre-commit.ci] pre-commit suggestions MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/executablebooks/mdformat: 0.7.22 → 1.0.0](https://github.com/executablebooks/mdformat/compare/0.7.22...1.0.0) - [github.com/JoC0de/pre-commit-prettier: b3e25fa39aa676c36bc18eb9eae6f26d9bb63f39 → v3.7.4](https://github.com/JoC0de/pre-commit-prettier/compare/b3e25fa39aa676c36bc18eb9eae6f26d9bb63f39...v3.7.4) - [github.com/astral-sh/ruff-pre-commit: v0.12.11 → v0.14.10](https://github.com/astral-sh/ruff-pre-commit/compare/v0.12.11...v0.14.10) - [github.com/sphinx-contrib/sphinx-lint: v1.0.0 → v1.0.2](https://github.com/sphinx-contrib/sphinx-lint/compare/v1.0.0...v1.0.2) - [github.com/tox-dev/pyproject-fmt: v2.6.0 → v2.11.1](https://github.com/tox-dev/pyproject-fmt/compare/v2.6.0...v2.11.1) --- .pre-commit-config.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 41bf4aa8..d2531061 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -36,7 +36,7 @@ repos: args: ["--in-place"] - repo: https://github.com/executablebooks/mdformat - rev: 0.7.22 + rev: 1.0.0 hooks: - id: mdformat additional_dependencies: @@ -47,7 +47,7 @@ repos: exclude: CHANGELOG.md - repo: https://github.com/JoC0de/pre-commit-prettier - rev: b3e25fa39aa676c36bc18eb9eae6f26d9bb63f39 # v3.6.2 using SHA as tags are not persistent + rev: v3.7.4 # v3.6.2 using SHA as tags are not persistent hooks: - id: prettier files: \.(json|yml|yaml|toml) @@ -55,7 +55,7 @@ repos: args: ["--print-width=120"] - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.12.11 + rev: v0.14.10 hooks: - id: ruff args: ["--fix"] @@ -63,12 +63,12 @@ repos: - id: ruff-check - repo: https://github.com/sphinx-contrib/sphinx-lint - rev: v1.0.0 + rev: v1.0.2 hooks: - id: sphinx-lint - repo: https://github.com/tox-dev/pyproject-fmt - rev: v2.6.0 + rev: v2.11.1 hooks: - id: pyproject-fmt additional_dependencies: [tox] From b5bf813e0fa1ce5d7f3e27b89c87ad6705b30c53 Mon Sep 17 00:00:00 2001 From: Jirka Borovec <6035284+Borda@users.noreply.github.com> Date: Tue, 6 Jan 2026 11:34:42 +0100 Subject: [PATCH 2/8] Update .pre-commit-config.yaml Co-authored-by: Bhimraj Yadav --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d2531061..daf4406a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -36,7 +36,7 @@ repos: args: ["--in-place"] - repo: https://github.com/executablebooks/mdformat - rev: 1.0.0 + rev: 0.7.22 hooks: - id: mdformat additional_dependencies: From 95dcf4b4b954ead2b40c11cc951fff49a72a7129 Mon Sep 17 00:00:00 2001 From: Bhimraj Yadav Date: Thu, 15 Jan 2026 12:58:07 +0545 Subject: [PATCH 3/8] Apply suggestion from @bhimrazy --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index daf4406a..3d5aa9fc 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -47,7 +47,7 @@ repos: exclude: CHANGELOG.md - repo: https://github.com/JoC0de/pre-commit-prettier - rev: v3.7.4 # v3.6.2 using SHA as tags are not persistent + rev: v3.7.4 hooks: - id: prettier files: \.(json|yml|yaml|toml) From d6c61bb0c5c3c2ca679f65af0d39d33cb69339bc Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Thu, 15 Jan 2026 07:14:08 +0000 Subject: [PATCH 4/8] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 3d5aa9fc..3d2159f5 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -47,7 +47,7 @@ repos: exclude: CHANGELOG.md - repo: https://github.com/JoC0de/pre-commit-prettier - rev: v3.7.4 + rev: v3.7.4 hooks: - id: prettier files: \.(json|yml|yaml|toml) From 9140fd4d4427be55601e26dfa398e4a3b5f09098 Mon Sep 17 00:00:00 2001 From: Bhimraj Yadav Date: Thu, 15 Jan 2026 13:09:20 +0545 Subject: [PATCH 5/8] Apply suggestion from @bhimrazy --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 3d2159f5..da7fcc4c 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -63,7 +63,7 @@ repos: - id: ruff-check - repo: https://github.com/sphinx-contrib/sphinx-lint - rev: v1.0.2 + rev: v1.0.0 hooks: - id: sphinx-lint From 1d1b6e3815b8349e00ab30ae5da25c17a29c3a06 Mon Sep 17 00:00:00 2001 From: Bhimraj Yadav Date: Thu, 15 Jan 2026 14:33:04 +0545 Subject: [PATCH 6/8] revert previous change --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index da7fcc4c..3d2159f5 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -63,7 +63,7 @@ repos: - id: ruff-check - repo: https://github.com/sphinx-contrib/sphinx-lint - rev: v1.0.0 + rev: v1.0.2 hooks: - id: sphinx-lint From 65a975cf3eb230475b06bc1a1b0421529dd850c1 Mon Sep 17 00:00:00 2001 From: bhimrazy Date: Thu, 15 Jan 2026 14:39:07 +0545 Subject: [PATCH 7/8] fix(tests): escape regex patterns in exception match messages for clarity --- tests/unittests/core/test_imports.py | 4 ++-- tests/unittests/core/test_rank_zero.py | 4 +++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/unittests/core/test_imports.py b/tests/unittests/core/test_imports.py index 1cb69195..915f82f5 100644 --- a/tests/unittests/core/test_imports.py +++ b/tests/unittests/core/test_imports.py @@ -153,7 +153,7 @@ def my_torch_func(i: int) -> int: def test_torch_func_raised(): with pytest.raises( ModuleNotFoundError, - match="Required dependencies not available: \nModule not found: 'torch.unknown.subpackage'. ", + match=re.escape("Required dependencies not available: \nModule not found: 'torch.unknown.subpackage'. "), ): my_torch_func(42) @@ -181,7 +181,7 @@ def __init__(self): def test_torch_class_raised(): with pytest.raises( - ModuleNotFoundError, match="Required dependencies not available: \nModule not found: 'torch>99.0'." + ModuleNotFoundError, match=re.escape("Required dependencies not available: \nModule not found: 'torch>99.0'.") ): MyTorchClass() diff --git a/tests/unittests/core/test_rank_zero.py b/tests/unittests/core/test_rank_zero.py index 9a51b031..b9e06967 100644 --- a/tests/unittests/core/test_rank_zero.py +++ b/tests/unittests/core/test_rank_zero.py @@ -1,3 +1,5 @@ +import re + import pytest from lightning_utilities.core.rank_zero import rank_prefixed_message, rank_zero_only @@ -5,7 +7,7 @@ def test_rank_zero_only_raises(): foo = rank_zero_only(lambda x: x + 1) - with pytest.raises(RuntimeError, match="rank_zero_only.rank` needs to be set "): + with pytest.raises(RuntimeError, match=re.escape("rank_zero_only.rank` needs to be set ")): foo(1) From ebc39e8a34de107077f40e2e4d6e33c5ccc4a8c5 Mon Sep 17 00:00:00 2001 From: Jirka Borovec <6035284+Borda@users.noreply.github.com> Date: Tue, 20 Jan 2026 05:07:01 +0100 Subject: [PATCH 8/8] Apply suggestions from code review --- .pre-commit-config.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 3d2159f5..d23091b7 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -36,7 +36,7 @@ repos: args: ["--in-place"] - repo: https://github.com/executablebooks/mdformat - rev: 0.7.22 + rev: 1.0.0 hooks: - id: mdformat additional_dependencies: