mirror of
https://github.com/KnugiHK/WhatsApp-Chat-Exporter.git
synced 2026-09-09 04:26:49 +02:00
Add type hints
This commit is contained in:
@@ -44,7 +44,7 @@ def convert_time_unit(time_second: int):
|
|||||||
return time
|
return time
|
||||||
|
|
||||||
|
|
||||||
def bytes_to_readable(size_bytes):
|
def bytes_to_readable(size_bytes: int):
|
||||||
"""From https://stackoverflow.com/a/14822210/9478891
|
"""From https://stackoverflow.com/a/14822210/9478891
|
||||||
Authors: james-sapam & other contributors
|
Authors: james-sapam & other contributors
|
||||||
Licensed under CC BY-SA 3.0
|
Licensed under CC BY-SA 3.0
|
||||||
@@ -59,7 +59,7 @@ def bytes_to_readable(size_bytes):
|
|||||||
return "%s %s" % (s, size_name[i])
|
return "%s %s" % (s, size_name[i])
|
||||||
|
|
||||||
|
|
||||||
def readable_to_bytes(size_str):
|
def readable_to_bytes(size_str: str):
|
||||||
SIZE_UNITS = {
|
SIZE_UNITS = {
|
||||||
'B': 1,
|
'B': 1,
|
||||||
'KB': 1024,
|
'KB': 1024,
|
||||||
|
|||||||
Reference in New Issue
Block a user