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
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ ci:

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
rev: v5.0.0
hooks:
- id: check-ast
- id: check-builtin-literals
Expand All @@ -28,19 +28,19 @@ repos:
- id: sort-simple-yaml
- id: trailing-whitespace
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.5.5
rev: v0.9.2
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
- id: ruff-format
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.11.0
rev: v1.14.1
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.21.0
rev: v1.31.0
hooks:
- id: sourcery
# The best way to use Sourcery in a pre-commit hook:
Expand Down
13 changes: 7 additions & 6 deletions docs/source/_static/pythonbible-basic-usage.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
}
],
"source": [
"import sys\n",
"!{sys.executable} -m pip install pythonbible"
]
},
Expand Down Expand Up @@ -171,10 +170,12 @@
}
],
"source": [
"bible.convert_references_to_verse_ids([\n",
" bible.NormalizedReference(bible.Book.MATTHEW, 18, 12, 18, 14),\n",
" bible.NormalizedReference(bible.Book.LUKE, 15, 3, 15, 7),\n",
"])"
"bible.convert_references_to_verse_ids(\n",
" [\n",
" bible.NormalizedReference(bible.Book.MATTHEW, 18, 12, 18, 14),\n",
" bible.NormalizedReference(bible.Book.LUKE, 15, 3, 15, 7),\n",
" ]\n",
")"
]
},
{
Expand Down Expand Up @@ -247,7 +248,7 @@
"source": [
"bible.format_scripture_references(\n",
" bible.get_references(\n",
" \"My favorite verses are Philippians 4:8, Isaiah 55:13, and Philippians 4:4-7.\"\n",
" \"My favorite verses are Philippians 4:8, Isaiah 55:13, and Philippians 4:4-7.\"\n",
" )\n",
")"
]
Expand Down
31 changes: 16 additions & 15 deletions docs/source/_static/pythonbible-book-groups.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
"metadata": {},
"outputs": [],
"source": [
"import sys\n",
"!{sys.executable} -m pip install pythonbible"
]
},
Expand Down Expand Up @@ -115,8 +114,7 @@
"outputs": [],
"source": [
"bible.get_references(\n",
" \"What are all of the books of the Old Testament?\",\n",
" book_groups=bible.BOOK_GROUPS\n",
" \"What are all of the books of the Old Testament?\", book_groups=bible.BOOK_GROUPS\n",
")"
]
},
Expand All @@ -138,8 +136,7 @@
"outputs": [],
"source": [
"references = bible.get_references(\n",
" \"What are all of the books of the Old Testament?\",\n",
" book_groups=bible.BOOK_GROUPS\n",
" \"What are all of the books of the Old Testament?\", book_groups=bible.BOOK_GROUPS\n",
")\n",
"bible.format_scripture_references(references)"
]
Expand All @@ -159,10 +156,7 @@
"metadata": {},
"outputs": [],
"source": [
"bible.format_scripture_references(\n",
" references,\n",
" always_include_chapter_numbers=True\n",
")"
"bible.format_scripture_references(references, always_include_chapter_numbers=True)"
]
},
{
Expand Down Expand Up @@ -191,7 +185,7 @@
"source": [
"bible.get_references(\n",
" \"I want to find the Old Testament books, not the Gospels.\",\n",
" book_groups=bible.BOOK_GROUPS\n",
" book_groups=bible.BOOK_GROUPS,\n",
")"
]
},
Expand All @@ -216,7 +210,7 @@
"}\n",
"bible.get_references(\n",
" \"I want to find the Old Testament books, not the Gospels.\",\n",
" book_groups=book_groups_subset\n",
" book_groups=book_groups_subset,\n",
")"
]
},
Expand All @@ -238,14 +232,21 @@
"outputs": [],
"source": [
"custom_book_groups = {\n",
" \"my favorite books\": [bible.Book.PSALMS, bible.Book.PROVERBS, bible.Book.JOHN, bible.Book.PHILIPPIANS, bible.Book.JAMES],\n",
" \"my favorite books\": [\n",
" bible.Book.PSALMS,\n",
" bible.Book.PROVERBS,\n",
" bible.Book.JOHN,\n",
" bible.Book.PHILIPPIANS,\n",
" bible.Book.JAMES,\n",
" ],\n",
"}\n",
"references = bible.get_references(\n",
" \"What are my favorite books of the Bible?\",\n",
" book_groups=custom_book_groups\n",
" \"What are my favorite books of the Bible?\", book_groups=custom_book_groups\n",
")\n",
"\n",
"print(f\"My favorite books of the Bible are {bible.format_scripture_references(references)}!\")"
"print(\n",
" f\"My favorite books of the Bible are {bible.format_scripture_references(references)}!\"\n",
")"
]
}
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
"metadata": {},
"outputs": [],
"source": [
"import sys\n",
"!{sys.executable} -m pip install pythonbible"
]
},
Expand Down
1 change: 0 additions & 1 deletion docs/source/_static/pythonbible-single-chapter-books.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
"metadata": {},
"outputs": [],
"source": [
"import sys\n",
"!{sys.executable} -m pip install pythonbible"
]
},
Expand Down
5 changes: 3 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ ignore = [
]

[tool.ruff.lint.per-file-ignores]
"docs/source/_static/pythonbible-book-groups.ipynb" = ["E501", "T201"]
"docs/source/conf.py" = ["A001", "E501"]
"pythonbible/__init__.py" = ["F401"]
"pythonbible/bible/bible.py" = ["PLR0913", "FBT"]
Expand All @@ -101,8 +102,8 @@ ignore = [
"pythonbible/counters/chapter_counter.py" = ["TCH001"]
"pythonbible/counters/verse_counter.py" = ["TCH001"]
"pythonbible/errors.py" = ["PLR0913"]
"pythonbible/formatter.py" = ["ANN401", "FBT", "PLR0911"]
"pythonbible/parser.py" = ["PLR2004"]
"pythonbible/formatter.py" = ["A005", "ANN401", "FBT", "PLR0911"]
"pythonbible/parser.py" = ["A005", "PLR2004"]
"pythonbible/roman_numeral_util.py" = ["E741"]
"pythonbible/versions.py" = ["ARG003", "PYI034"]
"tests/*.py" = ["D100", "D103", "D104", "PLR2004", "S101", "TRY301"]
Expand Down
Loading
Loading