Add type hints (#1614)

* Add type hints

* Fix linters

* Add remaining type hints

* Fix type-checking linter

* Update jrnl/DayOneJournal.py

Co-authored-by: Jonathan Wren <jonathan@nowandwren.com>
This commit is contained in:
outa 2022-11-05 23:29:50 +01:00 committed by GitHub
parent c1eb0c54a3
commit 30b41fdb88
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
28 changed files with 219 additions and 120 deletions

View file

@ -17,7 +17,7 @@ from jrnl.os_compat import split_args
from jrnl.output import print_msg
def get_text_from_editor(config, template=""):
def get_text_from_editor(config: dict, template: str = "") -> str:
suffix = ".jrnl"
if config["template"]:
template_filename = Path(config["template"]).name
@ -50,7 +50,7 @@ def get_text_from_editor(config, template=""):
return raw
def get_text_from_stdin():
def get_text_from_stdin() -> str:
print_msg(
Message(
MsgText.WritingEntryStart,