diff --git a/machine/scripture/parse.py b/machine/scripture/parse.py index 87a18f4..d6c3650 100644 --- a/machine/scripture/parse.py +++ b/machine/scripture/parse.py @@ -109,7 +109,7 @@ def get_chapters(chapter_selections: str) -> dict: raise RuntimeError(f"{span} is an invalid book range.") for i in range(book_id_to_number(ends[0]), book_id_to_number(ends[1]) + 1): - if not i in chapters: + if i not in chapters: chapters[i] = set() for subtraction in subtractions: diff --git a/tests/scripture/test_parse.py b/tests/scripture/test_parse.py index 4454383..a10aba3 100644 --- a/tests/scripture/test_parse.py +++ b/tests/scripture/test_parse.py @@ -50,6 +50,7 @@ def test_get_chapters() -> None: assert get_chapters("MAT400-500") == {} assert get_chapters("MAT1-4,12,9,100") == {40: [1, 2, 3, 4, 9, 12]} assert get_chapters("MAT-LUK") == {40: [], 41: [], 42: []} + assert get_chapters("MAT1,2,3;MAT-LUK") == {40: [1, 2, 3], 41: [], 42: []} assert get_chapters("2JN-3JN;EXO1,8,3-5;GEN") == {1: [], 2: [1, 3, 4, 5, 8], 63: [], 64: []} assert get_chapters("NT;OT;-MRK;-EXO") == whole_bible