Skip to content

Commit 9fe0cfb

Browse files
[pre-commit.ci] pre-commit autoupdate (#205)
* [pre-commit.ci] pre-commit autoupdate updates: - [github.com/astral-sh/ruff-pre-commit: v0.12.9 → v0.14.3](astral-sh/ruff-pre-commit@v0.12.9...v0.14.3) - [github.com/pre-commit/mirrors-mypy: v1.17.1 → v1.18.2](pre-commit/mirrors-mypy@v1.17.1...v1.18.2) - [github.com/sourcery-ai/sourcery: v1.37.0 → v1.40.1b3](sourcery-ai/sourcery@v1.37.0...v1.40.1b3) * fix new linting errors with updated version of ruff --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Nathan Patton <npatton@gmail.com>
1 parent 228757b commit 9fe0cfb

4 files changed

Lines changed: 8 additions & 8 deletions

File tree

.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,19 +28,19 @@ repos:
2828
- id: sort-simple-yaml
2929
- id: trailing-whitespace
3030
- repo: https://github.com/astral-sh/ruff-pre-commit
31-
rev: v0.12.9
31+
rev: v0.14.3
3232
hooks:
3333
- id: ruff
3434
args: [--fix, --exit-non-zero-on-fix]
3535
- id: ruff-format
3636
- repo: https://github.com/pre-commit/mirrors-mypy
37-
rev: v1.17.1
37+
rev: v1.18.2
3838
hooks:
3939
- id: mypy
4040
args: ["--config-file", "pyproject.toml", "--ignore-missing-imports"]
4141
#args: [--strict, --ignore-missing-imports]
4242
- repo: https://github.com/sourcery-ai/sourcery
43-
rev: v1.37.0
43+
rev: v1.40.1b3
4444
hooks:
4545
- id: sourcery
4646
# The best way to use Sourcery in a pre-commit hook:

pythonbible/formatter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ def format_scripture_text(verse_ids: list[int], **kwargs: Any) -> str:
355355
current_end_verse: int | None = None
356356

357357
for verse_id in verse_ids:
358-
book, chapter_number, verse_number = get_book_chapter_verse(verse_id)
358+
book, chapter_number, _ = get_book_chapter_verse(verse_id)
359359

360360
if (
361361
one_verse_per_paragraph

tests/converter_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ def test_convert_verse_ids_to_references_invalid(invalid_verse_id: int) -> None:
105105
# Given a list of verse ids with an invalid verse id
106106
# When we attempt to convert them into a list of references
107107
# Then an error is raised
108-
with pytest.raises(bible.InvalidVerseError, match="1100100 is not a valid verse."):
108+
with pytest.raises(bible.InvalidVerseError, match=r"1100100 is not a valid verse."):
109109
bible.convert_verse_ids_to_references([invalid_verse_id])
110110

111111

@@ -116,7 +116,7 @@ def test_convert_verse_ids_to_references_invalid2(
116116
# Given a list of verse ids with an invalid verse id
117117
# When we attempt to convert them into a list of references
118118
# Then an error is raised
119-
with pytest.raises(bible.InvalidVerseError, match="1100100 is not a valid verse."):
119+
with pytest.raises(bible.InvalidVerseError, match=r"1100100 is not a valid verse."):
120120
bible.convert_verse_ids_to_references([verse_id, invalid_verse_id])
121121

122122

tests/verses_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def test_get_verse_id_invalid_verse(
4242
# When the get_verse_id() function is called, Then an exception is raised.
4343
with pytest.raises(
4444
bible.InvalidVerseError,
45-
match="Genesis 1:100 is not a valid Bible verse. Valid verses for that book "
45+
match=r"Genesis 1:100 is not a valid Bible verse. Valid verses for that book "
4646
"and chapter are 1-31",
4747
):
4848
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:
9191
# Given an invalid verse id
9292
# When attempting to get the book, chapter, and verse
9393
# Then an error is raised.
94-
with pytest.raises(bible.InvalidVerseError, match="1100100 is not a valid verse."):
94+
with pytest.raises(bible.InvalidVerseError, match=r"1100100 is not a valid verse."):
9595
bible.get_book_chapter_verse(invalid_verse_id)
9696

9797

0 commit comments

Comments
 (0)