mirror of
https://github.com/jrnl-org/jrnl.git
synced 2025-07-06 08:26: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
|
@ -22,8 +22,12 @@ def __get_pdt_calendar():
|
|||
|
||||
|
||||
def parse(
|
||||
date_str, inclusive=False, default_hour=None, default_minute=None, bracketed=False
|
||||
):
|
||||
date_str: str | datetime.datetime,
|
||||
inclusive: bool = False,
|
||||
default_hour: int | None = None,
|
||||
default_minute: int | None = None,
|
||||
bracketed: bool = False,
|
||||
) -> datetime.datetime | None:
|
||||
"""Parses a string containing a fuzzy date and returns a datetime.datetime object"""
|
||||
if not date_str:
|
||||
return None
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue