Skip to content

Commit 16192f1

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 7f56332 commit 16192f1

File tree

5 files changed

+55
-55
lines changed

5 files changed

+55
-55
lines changed

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
},

tests/conftest.py

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -5,55 +5,55 @@
55
import pythonbible as bible
66

77

8-
@pytest.fixture()
8+
@pytest.fixture
99
def verse_id() -> int:
1010
return 1001001
1111

1212

13-
@pytest.fixture()
13+
@pytest.fixture
1414
def invalid_verse_id() -> int:
1515
return 1100100
1616

1717

18-
@pytest.fixture()
18+
@pytest.fixture
1919
def book() -> bible.Book:
2020
return bible.Book.GENESIS
2121

2222

23-
@pytest.fixture()
23+
@pytest.fixture
2424
def chapter() -> int:
2525
return 1
2626

2727

28-
@pytest.fixture()
28+
@pytest.fixture
2929
def verse() -> int:
3030
return 1
3131

3232

33-
@pytest.fixture()
33+
@pytest.fixture
3434
def invalid_chapter() -> int:
3535
return 100
3636

3737

38-
@pytest.fixture()
38+
@pytest.fixture
3939
def invalid_verse() -> int:
4040
return 100
4141

4242

43-
@pytest.fixture()
43+
@pytest.fixture
4444
def text_with_reference() -> str:
4545
return "The parable of the lost sheep is told in Matthew 18:12-14 and Luke 15:3-7."
4646

4747

48-
@pytest.fixture()
48+
@pytest.fixture
4949
def text_with_reference_complex() -> str:
5050
return (
5151
"You should read Psalm 130:4,8, Jeremiah 29:32-30:10,31:12, "
5252
"Matthew 1:18 - 2:18, and Luke 3: 5-7."
5353
)
5454

5555

56-
@pytest.fixture()
56+
@pytest.fixture
5757
def normalized_references_complex() -> list[bible.NormalizedReference]:
5858
return [
5959
bible.NormalizedReference(bible.Book.PSALMS, 130, 4, 130, 4),
@@ -65,45 +65,45 @@ def normalized_references_complex() -> list[bible.NormalizedReference]:
6565
]
6666

6767

68-
@pytest.fixture()
68+
@pytest.fixture
6969
def non_normalized_reference() -> str:
7070
return "Matthew 18:12-14"
7171

7272

73-
@pytest.fixture()
73+
@pytest.fixture
7474
def reference_without_verse_numbers() -> str:
7575
return "Exodus 20"
7676

7777

78-
@pytest.fixture()
78+
@pytest.fixture
7979
def reference_range_without_verse_numbers() -> str:
8080
return "Genesis 1-4"
8181

8282

83-
@pytest.fixture()
83+
@pytest.fixture
8484
def reference() -> bible.NormalizedReference:
8585
return bible.NormalizedReference(bible.Book.GENESIS, 1, 1, 3, 4)
8686

8787

88-
@pytest.fixture()
88+
@pytest.fixture
8989
def invalid_reference() -> bible.NormalizedReference:
9090
return bible.NormalizedReference(bible.Book.GENESIS, 1, 1, 100, 100)
9191

9292

93-
@pytest.fixture()
93+
@pytest.fixture
9494
def reference_string() -> str:
9595
return "Genesis 1:1-3:4"
9696

9797

98-
@pytest.fixture()
98+
@pytest.fixture
9999
def references() -> list[bible.NormalizedReference]:
100100
return [
101101
bible.NormalizedReference(bible.Book.MATTHEW, 18, 12, 18, 14),
102102
bible.NormalizedReference(bible.Book.LUKE, 15, 3, 15, 7),
103103
]
104104

105105

106-
@pytest.fixture()
106+
@pytest.fixture
107107
def verse_ids() -> list[int]:
108108
return [
109109
40018012,
@@ -117,7 +117,7 @@ def verse_ids() -> list[int]:
117117
]
118118

119119

120-
@pytest.fixture()
120+
@pytest.fixture
121121
def verse_ids_multiple_chapters() -> list[int]:
122122
return [
123123
40018012,
@@ -127,7 +127,7 @@ def verse_ids_multiple_chapters() -> list[int]:
127127
]
128128

129129

130-
@pytest.fixture()
130+
@pytest.fixture
131131
def verse_ids_complex() -> list[int]:
132132
return [
133133
19130004,
@@ -176,20 +176,20 @@ def verse_ids_complex() -> list[int]:
176176
]
177177

178178

179-
@pytest.fixture()
179+
@pytest.fixture
180180
def formatted_reference() -> str:
181181
return "Psalms 130:4,8;Jeremiah 29:32-30:10,31:12;Matthew 1:18-2:18;Luke 3:5-7"
182182

183183

184-
@pytest.fixture()
184+
@pytest.fixture
185185
def roman_numeral_references() -> str:
186186
return (
187187
"Psalm cxxx.4,8, Jeremiah xxix. 32 - xxx. 10, xxxi. 12, "
188188
"Matthew i. 18 - ii. 18, and Luke iii. 5-7."
189189
)
190190

191191

192-
@pytest.fixture()
192+
@pytest.fixture
193193
def html_scripture_text() -> str:
194194
return (
195195
"<h1>Matthew</h1>\n"
@@ -215,7 +215,7 @@ def html_scripture_text() -> str:
215215
)
216216

217217

218-
@pytest.fixture()
218+
@pytest.fixture
219219
def non_html_scripture_text() -> str:
220220
return (
221221
"Matthew\n\n"
@@ -241,7 +241,7 @@ def non_html_scripture_text() -> str:
241241
)
242242

243243

244-
@pytest.fixture()
244+
@pytest.fixture
245245
def non_html_scripture_text_readers() -> str:
246246
return (
247247
"Matthew\n\n"
@@ -267,7 +267,7 @@ def non_html_scripture_text_readers() -> str:
267267
)
268268

269269

270-
@pytest.fixture()
270+
@pytest.fixture
271271
def html_scripture_text_one_verse_per_paragraph() -> str:
272272
return (
273273
"<h1>Matthew</h1>\n"
@@ -287,7 +287,7 @@ def html_scripture_text_one_verse_per_paragraph() -> str:
287287
)
288288

289289

290-
@pytest.fixture()
290+
@pytest.fixture
291291
def non_html_scripture_text_one_verse_per_paragraph() -> str:
292292
return (
293293
"Matthew\n\n"
@@ -314,23 +314,23 @@ def non_html_scripture_text_one_verse_per_paragraph() -> str:
314314
)
315315

316316

317-
@pytest.fixture()
317+
@pytest.fixture
318318
def verse_text_no_verse_number() -> str:
319319
return "In the beginning God created the heaven and the earth."
320320

321321

322-
@pytest.fixture()
322+
@pytest.fixture
323323
def long_book_title() -> str:
324324
return "The First Book of Moses, called Genesis"
325325

326326

327-
@pytest.fixture()
327+
@pytest.fixture
328328
def short_book_title() -> str:
329329
return "Genesis"
330330

331331

332332
# noinspection SpellCheckingInspection
333-
@pytest.fixture()
333+
@pytest.fixture
334334
def book_alternative_names() -> dict[bible.Book, list[str]]:
335335
return {
336336
bible.Book.GENESIS: [
@@ -831,7 +831,7 @@ def book_alternative_names() -> dict[bible.Book, list[str]]:
831831
}
832832

833833

834-
@pytest.fixture()
834+
@pytest.fixture
835835
def book_alternative_names_verbum() -> dict[bible.Book, list[str]]:
836836
"""Return the abbreviations supported by verbum.
837837

0 commit comments

Comments
 (0)