This commit is contained in:
Nyako
2026-06-06 15:07:26 +03:00
parent 2c2aa65947
commit 21e37776f9
7 changed files with 61 additions and 66 deletions
+1 -1
View File
@@ -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}"