mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-07-02 06:56:12 +02:00
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:
parent
c1eb0c54a3
commit
30b41fdb88
28 changed files with 219 additions and 120 deletions
|
@ -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))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue