Skip to content

Commit 15555b8

Browse files
authored
Merge branch 'main' into more-en-version-texts
2 parents 11abea2 + 61a9e13 commit 15555b8

8 files changed

Lines changed: 1233 additions & 48 deletions

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
]
2424
steps:
2525
- uses: actions/checkout@v4
26-
- uses: wntrblm/nox@2024.04.15
26+
- uses: wntrblm/nox@2025.02.09
2727
with:
2828
python-versions: "3.8, 3.9, 3.10, 3.11, 3.12"
2929
- name: Test with NOX

.pre-commit-config.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ ci:
33

44
repos:
55
- repo: https://github.com/pre-commit/pre-commit-hooks
6-
rev: v4.6.0
6+
rev: v5.0.0
77
hooks:
88
- id: check-ast
99
- id: check-builtin-literals
@@ -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.4.5
31+
rev: v0.11.2
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.10.0
37+
rev: v1.15.0
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.18.0
43+
rev: v1.35.0
4444
hooks:
4545
- id: sourcery
4646
# The best way to use Sourcery in a pre-commit hook:

docs/source/_static/pythonbible-basic-usage.ipynb

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
}
2626
],
2727
"source": [
28-
"import sys\n",
2928
"!{sys.executable} -m pip install pythonbible"
3029
]
3130
},
@@ -171,10 +170,12 @@
171170
}
172171
],
173172
"source": [
174-
"bible.convert_references_to_verse_ids([\n",
175-
" bible.NormalizedReference(bible.Book.MATTHEW, 18, 12, 18, 14),\n",
176-
" bible.NormalizedReference(bible.Book.LUKE, 15, 3, 15, 7),\n",
177-
"])"
173+
"bible.convert_references_to_verse_ids(\n",
174+
" [\n",
175+
" bible.NormalizedReference(bible.Book.MATTHEW, 18, 12, 18, 14),\n",
176+
" bible.NormalizedReference(bible.Book.LUKE, 15, 3, 15, 7),\n",
177+
" ]\n",
178+
")"
178179
]
179180
},
180181
{
@@ -247,7 +248,7 @@
247248
"source": [
248249
"bible.format_scripture_references(\n",
249250
" bible.get_references(\n",
250-
" \"My favorite verses are Philippians 4:8, Isaiah 55:13, and Philippians 4:4-7.\"\n",
251+
" \"My favorite verses are Philippians 4:8, Isaiah 55:13, and Philippians 4:4-7.\"\n",
251252
" )\n",
252253
")"
253254
]

docs/source/_static/pythonbible-book-groups.ipynb

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
"metadata": {},
1818
"outputs": [],
1919
"source": [
20-
"import sys\n",
2120
"!{sys.executable} -m pip install pythonbible"
2221
]
2322
},
@@ -115,8 +114,7 @@
115114
"outputs": [],
116115
"source": [
117116
"bible.get_references(\n",
118-
" \"What are all of the books of the Old Testament?\",\n",
119-
" book_groups=bible.BOOK_GROUPS\n",
117+
" \"What are all of the books of the Old Testament?\", book_groups=bible.BOOK_GROUPS\n",
120118
")"
121119
]
122120
},
@@ -138,8 +136,7 @@
138136
"outputs": [],
139137
"source": [
140138
"references = bible.get_references(\n",
141-
" \"What are all of the books of the Old Testament?\",\n",
142-
" book_groups=bible.BOOK_GROUPS\n",
139+
" \"What are all of the books of the Old Testament?\", book_groups=bible.BOOK_GROUPS\n",
143140
")\n",
144141
"bible.format_scripture_references(references)"
145142
]
@@ -159,10 +156,7 @@
159156
"metadata": {},
160157
"outputs": [],
161158
"source": [
162-
"bible.format_scripture_references(\n",
163-
" references,\n",
164-
" always_include_chapter_numbers=True\n",
165-
")"
159+
"bible.format_scripture_references(references, always_include_chapter_numbers=True)"
166160
]
167161
},
168162
{
@@ -191,7 +185,7 @@
191185
"source": [
192186
"bible.get_references(\n",
193187
" \"I want to find the Old Testament books, not the Gospels.\",\n",
194-
" book_groups=bible.BOOK_GROUPS\n",
188+
" book_groups=bible.BOOK_GROUPS,\n",
195189
")"
196190
]
197191
},
@@ -216,7 +210,7 @@
216210
"}\n",
217211
"bible.get_references(\n",
218212
" \"I want to find the Old Testament books, not the Gospels.\",\n",
219-
" book_groups=book_groups_subset\n",
213+
" book_groups=book_groups_subset,\n",
220214
")"
221215
]
222216
},
@@ -238,14 +232,21 @@
238232
"outputs": [],
239233
"source": [
240234
"custom_book_groups = {\n",
241-
" \"my favorite books\": [bible.Book.PSALMS, bible.Book.PROVERBS, bible.Book.JOHN, bible.Book.PHILIPPIANS, bible.Book.JAMES],\n",
235+
" \"my favorite books\": [\n",
236+
" bible.Book.PSALMS,\n",
237+
" bible.Book.PROVERBS,\n",
238+
" bible.Book.JOHN,\n",
239+
" bible.Book.PHILIPPIANS,\n",
240+
" bible.Book.JAMES,\n",
241+
" ],\n",
242242
"}\n",
243243
"references = bible.get_references(\n",
244-
" \"What are my favorite books of the Bible?\",\n",
245-
" book_groups=custom_book_groups\n",
244+
" \"What are my favorite books of the Bible?\", book_groups=custom_book_groups\n",
246245
")\n",
247246
"\n",
248-
"print(f\"My favorite books of the Bible are {bible.format_scripture_references(references)}!\")"
247+
"print(\n",
248+
" f\"My favorite books of the Bible are {bible.format_scripture_references(references)}!\"\n",
249+
")"
249250
]
250251
}
251252
],

docs/source/_static/pythonbible-multi-book-references.ipynb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
"metadata": {},
1818
"outputs": [],
1919
"source": [
20-
"import sys\n",
2120
"!{sys.executable} -m pip install pythonbible"
2221
]
2322
},

docs/source/_static/pythonbible-single-chapter-books.ipynb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@
1717
"metadata": {},
1818
"outputs": [],
1919
"source": [
20-
"import sys\n",
2120
"!{sys.executable} -m pip install pythonbible"
2221
]
2322
},

pyproject.toml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -92,19 +92,20 @@ ignore = [
9292
]
9393

9494
[tool.ruff.lint.per-file-ignores]
95+
"docs/source/_static/pythonbible-book-groups.ipynb" = ["E501", "T201"]
9596
"docs/source/conf.py" = ["A001", "E501"]
9697
"pythonbible/__init__.py" = ["F401"]
9798
"pythonbible/bible/bible.py" = ["PLR0913", "FBT"]
98-
"pythonbible/books.py" = ["ARG003", "PYI034"]
99-
"pythonbible/book_groups.py" = ["ARG003", "PYI034"]
99+
"pythonbible/books.py" = ["ARG003", "ARG004", "PYI034"]
100+
"pythonbible/book_groups.py" = ["ARG003", "ARG004", "PYI034"]
100101
"pythonbible/counters/book_counter.py" = ["TCH001"]
101102
"pythonbible/counters/chapter_counter.py" = ["TCH001"]
102103
"pythonbible/counters/verse_counter.py" = ["TCH001"]
103104
"pythonbible/errors.py" = ["PLR0913"]
104-
"pythonbible/formatter.py" = ["ANN401", "F841", "FBT", "PLR0911"] # TODO - remove F841
105-
"pythonbible/parser.py" = ["PLR2004"]
105+
"pythonbible/formatter.py" = ["A005", "ANN401", "F841", "FBT", "PLR0911"] # TODO - remove F841
106+
"pythonbible/parser.py" = ["A005", "PLR2004"]
106107
"pythonbible/roman_numeral_util.py" = ["E741"]
107-
"pythonbible/versions.py" = ["ARG003", "PYI034"]
108+
"pythonbible/versions.py" = ["ARG003", "ARG004", "PYI034"]
108109
"tests/*.py" = ["D100", "D103", "D104", "FBT003", "PLR2004", "S101", "TRY301"]
109110
"tests/conftest.py" = ["E501", "RUF"]
110111
"tests/errors_test.py" = ["PT017"]

0 commit comments

Comments
 (0)