diff --git a/feefifofum/helpers/__init__.py b/feefifofum/core/__init__.py similarity index 100% rename from feefifofum/helpers/__init__.py rename to feefifofum/core/__init__.py diff --git a/feefifofum/helpers/constants.py b/feefifofum/core/constants.py similarity index 100% rename from feefifofum/helpers/constants.py rename to feefifofum/core/constants.py diff --git a/feefifofum/helpers/table.py b/feefifofum/core/table.py similarity index 95% rename from feefifofum/helpers/table.py rename to feefifofum/core/table.py index 1f42b64..67fcb16 100644 --- a/feefifofum/helpers/table.py +++ b/feefifofum/core/table.py @@ -2,7 +2,7 @@ from __future__ import annotations -from feefifofum.helpers.constants import TABLE_LEFT_EDGE, TABLE_RIGHT_EDGE, TABLE_SEPARATOR, TABLE_SPACER +from feefifofum.core.constants import TABLE_LEFT_EDGE, TABLE_RIGHT_EDGE, TABLE_SEPARATOR, TABLE_SPACER def identify_and_format_tables(file_lines: list[str]) -> list[str]: @@ -92,5 +92,5 @@ def _add_table_to_mapping(table: list[str], start_index: int | None, table_mappi :param start_index: Starting index of table :param table_mapping: Mapping of table starting index to table content """ - if table: + if table and start_index: table_mapping[start_index] = table diff --git a/feefifofum/helpers/whitespace.py b/feefifofum/core/whitespace.py similarity index 94% rename from feefifofum/helpers/whitespace.py rename to feefifofum/core/whitespace.py index 4c6f581..1423a3b 100644 --- a/feefifofum/helpers/whitespace.py +++ b/feefifofum/core/whitespace.py @@ -2,7 +2,7 @@ from __future__ import annotations -from feefifofum.helpers.constants import INDENT_SIZE, TABLE_SEPARATOR, WHITESPACE_CONFIG +from feefifofum.core.constants import INDENT_SIZE, TABLE_SEPARATOR, WHITESPACE_CONFIG def strip_whitespace(file_lines: list[str]) -> list[str]: diff --git a/feefifofum/main.py b/feefifofum/main.py index 59c7960..bb7bad9 100644 --- a/feefifofum/main.py +++ b/feefifofum/main.py @@ -5,8 +5,8 @@ from argparse import ArgumentParser from pathlib import Path -from feefifofum.helpers.table import identify_and_format_tables -from feefifofum.helpers.whitespace import format_whitespace, strip_whitespace +from feefifofum.core.table import identify_and_format_tables +from feefifofum.core.whitespace import format_whitespace, strip_whitespace from feefifofum.utils.file_utils import get_file_paths, read_file_lines, write_file_lines