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

@ -4,13 +4,13 @@
import os.path
def home_dir():
def home_dir() -> str:
return os.path.expanduser("~")
def expand_path(path):
def expand_path(path: str) -> str:
return os.path.expanduser(os.path.expandvars(path))
def absolute_path(path):
def absolute_path(path: str) -> str:
return os.path.abspath(expand_path(path))