0.1.10s
This commit is contained in:
@@ -11,7 +11,7 @@ def find_file(filename: str, file_folders: list[str], is_folder: bool = True):
|
||||
return str(folder_path) if is_folder else str(file_path)
|
||||
return None
|
||||
|
||||
def get_size_format(b, factor=1024, suffix="B"):
|
||||
def get_size_format(b: int, factor=1024, suffix="B"):
|
||||
for unit in ["", "K", "M", "G", "T"]:
|
||||
if b < factor:
|
||||
return f"{b:.2f} {unit}{suffix}"
|
||||
|
||||
Reference in New Issue
Block a user