More typing

This commit is contained in:
Keith Edmunds 2023-02-01 08:43:53 +00:00
parent 5d50ebf3aa
commit f182f49f15

View File

@ -94,7 +94,7 @@ def get_tags(path: str) -> Dict[str, Any]:
)
def get_relative_date(past_date: datetime,
def get_relative_date(past_date: Optional[datetime],
reference_date: Optional[datetime] = None) -> str:
"""
Return how long before reference_date past_date is as string.
@ -185,7 +185,8 @@ def send_mail(to_addr, from_addr, subj, body):
s.quit()
def ms_to_mmss(ms: int, decimals: int = 0, negative: bool = False) -> str:
def ms_to_mmss(ms: Optional[int], decimals: int = 0,
negative: bool = False) -> str:
"""Convert milliseconds to mm:ss"""
minutes: int