Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion pythonbible/formatter.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions tests/converter_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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])


Expand All @@ -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])


Expand Down
4 changes: 2 additions & 2 deletions tests/verses_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)


Expand Down
Loading