From 30cff71e768188ff542b42dc8463b55aa9f7a716 Mon Sep 17 00:00:00 2001 From: KnugiHK <24708955+KnugiHK@users.noreply.github.com> Date: Tue, 24 Sep 2024 23:31:59 +0800 Subject: [PATCH] Add type hints --- Whatsapp_Chat_Exporter/utility.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Whatsapp_Chat_Exporter/utility.py b/Whatsapp_Chat_Exporter/utility.py index f13bf1e..9f8c45c 100644 --- a/Whatsapp_Chat_Exporter/utility.py +++ b/Whatsapp_Chat_Exporter/utility.py @@ -44,7 +44,7 @@ def convert_time_unit(time_second: int): return time -def bytes_to_readable(size_bytes): +def bytes_to_readable(size_bytes: int): """From https://stackoverflow.com/a/14822210/9478891 Authors: james-sapam & other contributors Licensed under CC BY-SA 3.0 @@ -59,7 +59,7 @@ def bytes_to_readable(size_bytes): return "%s %s" % (s, size_name[i]) -def readable_to_bytes(size_str): +def readable_to_bytes(size_str: str): SIZE_UNITS = { 'B': 1, 'KB': 1024,