rename jrnl.py to controller.py

This commit is contained in:
Jonathan Wren 2023-01-10 17:14:53 -08:00
parent 9985c8a87a
commit 36a22352c6
4 changed files with 5 additions and 5 deletions

View file

@ -31,7 +31,7 @@ if TYPE_CHECKING:
from jrnl.Entry import Entry from jrnl.Entry import Entry
def run(args: "Namespace"): def start(args: "Namespace"):
""" """
Flow: Flow:
1. Run standalone command if it doesn't require config (help, version, etc), then exit 1. Run standalone command if it doesn't require config (help, version, etc), then exit

View file

@ -7,7 +7,7 @@ import traceback
from rich.logging import RichHandler from rich.logging import RichHandler
from jrnl import jrnl from jrnl import controller
from jrnl.args import parse_args from jrnl.args import parse_args
from jrnl.exception import JrnlException from jrnl.exception import JrnlException
from jrnl.messages import Message from jrnl.messages import Message
@ -41,7 +41,7 @@ def run(manual_args: list[str] | None = None) -> int:
configure_logger(args.debug) configure_logger(args.debug)
logging.debug("Parsed args:\n%s", args) logging.debug("Parsed args:\n%s", args)
status_code = jrnl.run(args) status_code = controller.start(args)
except JrnlException as e: except JrnlException as e:
status_code = 1 status_code = 1

View file

@ -144,7 +144,7 @@ def mock_overrides(config_in_memory):
return { return {
"overrides": lambda: patch( "overrides": lambda: patch(
"jrnl.jrnl.apply_overrides", side_effect=my_overrides "jrnl.controller.apply_overrides", side_effect=my_overrides
) )
} }

View file

@ -9,7 +9,7 @@ import pytest
import jrnl import jrnl
from jrnl.args import parse_args from jrnl.args import parse_args
from jrnl.jrnl import _display_search_results from jrnl.controller import _display_search_results
@pytest.fixture @pytest.fixture