Skip to content

Commit

Permalink
refactored utils module
Browse files Browse the repository at this point in the history
  • Loading branch information
aseemsavio committed Oct 22, 2022
1 parent 883ae23 commit 2463d79
Show file tree
Hide file tree
Showing 13 changed files with 17 additions and 39 deletions.
2 changes: 1 addition & 1 deletion catholic/core/canon/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
"execute_canon_command"
]

from catholic.core.canon.canon_law import execute_canon_command
from catholic.core.canon.canon_law import execute_canon_command
4 changes: 2 additions & 2 deletions catholic/core/canon/canon_law.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from catholic.core.canon.services import get_canon_law_by_id, get_canon_laws_with_given_substring, \
get_canon_law_paragraphs_by_paragraph_ids
from catholic.core.utils import load_pickle, error, markdown, blue_text, \
red_text
from catholic.core.utils.files import load_pickle
from catholic.core.utils.console import error, markdown, blue_text, red_text
from catholic.core.utils.query import decode_query


Expand Down
2 changes: 1 addition & 1 deletion catholic/core/canon/services.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from catholic.core.utils import string_contains
from catholic.core.utils.strings import string_contains


def get_canon_law_by_id(law_id: int, canon: list[dict]):
Expand Down
9 changes: 5 additions & 4 deletions catholic/core/catechism/catechism.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
from catholic.core.catechism.services import get_catechism_by_paragraph, get_catechism_paragraphs_with_given_substring, \
get_catechism_paragraphs_by_paragraph_ids
from catholic.core.utils import load_pickle, markdown, error, blue_text, \
red_text
from catholic.core.catechism.services import get_catechism_by_paragraph, \
get_catechism_paragraphs_with_given_substring, get_catechism_paragraphs_by_paragraph_ids
from catholic.core.utils.files import load_pickle
from catholic.core.utils.console import markdown, error, blue_text, red_text

from catholic.core.utils.query import decode_query


Expand Down
2 changes: 1 addition & 1 deletion catholic/core/catechism/services.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from catholic.core.utils import string_contains
from catholic.core.utils.strings import string_contains


def get_catechism_by_paragraph(paragraph_number: int, catechism: list[dict]):
Expand Down
8 changes: 4 additions & 4 deletions catholic/core/missal/missal.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from catholic.core.missal.services import get_roman_missal_by_number, get_roman_missal_paragraphs_with_given_substring, \
get_roman_missal_paragraphs_by_numbers
from catholic.core.utils import load_pickle, markdown, error, blue_text, \
red_text
from catholic.core.missal.services import get_roman_missal_by_number, \
get_roman_missal_paragraphs_with_given_substring, get_roman_missal_paragraphs_by_numbers
from catholic.core.utils.files import load_pickle
from catholic.core.utils.console import markdown, error, blue_text, red_text
from catholic.core.utils.query import decode_query


Expand Down
2 changes: 1 addition & 1 deletion catholic/core/missal/services.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from catholic.core.utils import string_contains
from catholic.core.utils.strings import string_contains


def get_roman_missal_by_number(missal_id: int, missal: list[dict]):
Expand Down
18 changes: 0 additions & 18 deletions catholic/core/utils/__init__.py
Original file line number Diff line number Diff line change
@@ -1,18 +0,0 @@
__all__ = [
"load_pickle",
"green_text",
"red_text",
"error",
"markdown",
"blue_text",
"remove_white_spaces",
"destructure_comma_separated_string",
"range_or_single_digit_list",
"range_string_to_int_list",
"get_uniques_as_sorted_list",
"string_contains"
]

from catholic.core.utils.display_utils import *
from catholic.core.utils.file_utils import load_pickle
from catholic.core.utils.string_utils import *
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from catholic.core.utils import remove_white_spaces, destructure_comma_separated_string, range_or_single_digit_list, \
get_uniques_as_sorted_list
from catholic.core.utils.strings import remove_white_spaces, destructure_comma_separated_string, \
range_or_single_digit_list, get_uniques_as_sorted_list


def decode_query(query: str) -> list[int]:
Expand Down
5 changes: 0 additions & 5 deletions catholic/core/utils/query/__init__.py

This file was deleted.

File renamed without changes.

0 comments on commit 2463d79

Please sign in to comment.