From abde34196bf9e728dc166034a0b37fa00664aebc Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 3 Nov 2025 21:27:52 +0000 Subject: [PATCH 1/2] [pre-commit.ci] pre-commit autoupdate MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit updates: - [github.com/astral-sh/ruff-pre-commit: v0.12.9 → v0.14.3](https://github.com/astral-sh/ruff-pre-commit/compare/v0.12.9...v0.14.3) - [github.com/pre-commit/mirrors-mypy: v1.17.1 → v1.18.2](https://github.com/pre-commit/mirrors-mypy/compare/v1.17.1...v1.18.2) - [github.com/sourcery-ai/sourcery: v1.37.0 → v1.40.1b3](https://github.com/sourcery-ai/sourcery/compare/v1.37.0...v1.40.1b3) --- .pre-commit-config.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index abcc194..b46f149 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -28,19 +28,19 @@ repos: - id: sort-simple-yaml - id: trailing-whitespace - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.12.9 + rev: v0.14.3 hooks: - id: ruff args: [--fix, --exit-non-zero-on-fix] - id: ruff-format - repo: https://github.com/pre-commit/mirrors-mypy - rev: v1.17.1 + rev: v1.18.2 hooks: - id: mypy args: ["--config-file", "pyproject.toml", "--ignore-missing-imports"] #args: [--strict, --ignore-missing-imports] - repo: https://github.com/sourcery-ai/sourcery - rev: v1.37.0 + rev: v1.40.1b3 hooks: - id: sourcery # The best way to use Sourcery in a pre-commit hook: From 0ce7a8333864a52c6549448394ab4079a88f94d0 Mon Sep 17 00:00:00 2001 From: Nathan Patton Date: Sun, 9 Nov 2025 14:24:15 -0600 Subject: [PATCH 2/2] fix new linting errors with updated version of ruff --- pythonbible/formatter.py | 2 +- tests/converter_test.py | 4 ++-- tests/verses_test.py | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pythonbible/formatter.py b/pythonbible/formatter.py index fdc471f..a0696ce 100644 --- a/pythonbible/formatter.py +++ b/pythonbible/formatter.py @@ -355,7 +355,7 @@ def format_scripture_text(verse_ids: list[int], **kwargs: Any) -> str: current_end_verse: int | None = None for verse_id in verse_ids: - book, chapter_number, verse_number = get_book_chapter_verse(verse_id) + book, chapter_number, _ = get_book_chapter_verse(verse_id) if ( one_verse_per_paragraph diff --git a/tests/converter_test.py b/tests/converter_test.py index f2c8402..b666c95 100644 --- a/tests/converter_test.py +++ b/tests/converter_test.py @@ -105,7 +105,7 @@ def test_convert_verse_ids_to_references_invalid(invalid_verse_id: int) -> None: # Given a list of verse ids with an invalid verse id # When we attempt to convert them into a list of references # Then an error is raised - with pytest.raises(bible.InvalidVerseError, match="1100100 is not a valid verse."): + with pytest.raises(bible.InvalidVerseError, match=r"1100100 is not a valid verse."): bible.convert_verse_ids_to_references([invalid_verse_id]) @@ -116,7 +116,7 @@ def test_convert_verse_ids_to_references_invalid2( # Given a list of verse ids with an invalid verse id # When we attempt to convert them into a list of references # Then an error is raised - with pytest.raises(bible.InvalidVerseError, match="1100100 is not a valid verse."): + with pytest.raises(bible.InvalidVerseError, match=r"1100100 is not a valid verse."): bible.convert_verse_ids_to_references([verse_id, invalid_verse_id]) diff --git a/tests/verses_test.py b/tests/verses_test.py index 1c64bc1..ac5fbab 100644 --- a/tests/verses_test.py +++ b/tests/verses_test.py @@ -42,7 +42,7 @@ def test_get_verse_id_invalid_verse( # When the get_verse_id() function is called, Then an exception is raised. with pytest.raises( bible.InvalidVerseError, - match="Genesis 1:100 is not a valid Bible verse. Valid verses for that book " + match=r"Genesis 1:100 is not a valid Bible verse. Valid verses for that book " "and chapter are 1-31", ): bible.verses.get_verse_id(book, chapter, invalid_verse) @@ -91,7 +91,7 @@ def test_get_book_chapter_verse_invalid(invalid_verse_id: int) -> None: # Given an invalid verse id # When attempting to get the book, chapter, and verse # Then an error is raised. - with pytest.raises(bible.InvalidVerseError, match="1100100 is not a valid verse."): + with pytest.raises(bible.InvalidVerseError, match=r"1100100 is not a valid verse."): bible.get_book_chapter_verse(invalid_verse_id)