From c092909e9777f8c901c425120cd4520f1dc1bcd7 Mon Sep 17 00:00:00 2001 From: Scott <38087336+mergemaven11@users.noreply.github.com> Date: Thu, 23 May 2024 08:17:43 -0400 Subject: [PATCH] fix journal.py imports --- .pylintrc | 3 +++ journal.py | 9 ++++++--- pyproject.toml | 1 + 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.pylintrc b/.pylintrc index a831076..11287ec 100644 --- a/.pylintrc +++ b/.pylintrc @@ -1,2 +1,5 @@ [MESSAGES CONTROL] disable=C0103 + +[MASTER] +init-hook='import sys; sys.path.append(".")' diff --git a/journal.py b/journal.py index e1f94cd..5857db1 100644 --- a/journal.py +++ b/journal.py @@ -4,8 +4,11 @@ import typer -from .cli import handlers as handler -from .cli import utils as util +from cli import handlers as handler +from cli import utils as util + +# from .cli import handlers as handler + app = typer.Typer() @@ -32,7 +35,7 @@ def add(entries_file: str): # Add entries_file as an argument entry = typer.prompt("Please enter your journal entry") # Send data to add handler handler.add_entry_to_file( - entries_file, {"Title": title, "Entry": entry} + entries_file=entries_file, entry_obj={"Title": title, "Entry": entry} ) # Pass entries_file argument diff --git a/pyproject.toml b/pyproject.toml index f6db9de..f5d39ea 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -22,6 +22,7 @@ pre-commit = "^3.7.1" [tool.pylint] disable = ["C0114", "C0115", "C0116"] # Disable missing module, class, and function docstrings +init-hook = 'import sys; sys.path.append(".")' [tool.mypy] mypy_path = ["./chronicle_cli"]