Add type hints to utils

This commit is contained in:
kramo
2023-08-16 20:16:30 +02:00
parent eeb18eb017
commit 0d32414f1e
8 changed files with 75 additions and 49 deletions

View File

@@ -18,11 +18,12 @@
# SPDX-License-Identifier: GPL-3.0-or-later
from datetime import datetime
from typing import Any
from gi.repository import GLib
def relative_date(timestamp): # pylint: disable=too-many-return-statements
def relative_date(timestamp: int) -> Any: # pylint: disable=too-many-return-statements
days_no = ((today := datetime.today()) - datetime.fromtimestamp(timestamp)).days
if days_no == 0: