Coverage for opt/mealie/lib/python3.12/site-packages/mealie/schema/group/group_statistics.py: 100%
10 statements
« prev ^ index » next coverage.py v7.10.6, created at 2025-11-25 15:32 +0000
« prev ^ index » next coverage.py v7.10.6, created at 2025-11-25 15:32 +0000
1from mealie.pkgs.stats import fs_stats 1a
2from mealie.schema._mealie import MealieModel 1a
5class GroupStorage(MealieModel): 1a
6 used_storage_bytes: int 1a
7 used_storage_str: str 1a
8 total_storage_bytes: int 1a
9 total_storage_str: str 1a
11 @classmethod 1a
12 def bytes(cls, used_storage_bytes: int, total_storage_bytes: int) -> "GroupStorage": 1a
13 return cls( 1b
14 used_storage_bytes=used_storage_bytes,
15 used_storage_str=fs_stats.pretty_size(used_storage_bytes),
16 total_storage_bytes=total_storage_bytes,
17 total_storage_str=fs_stats.pretty_size(total_storage_bytes),
18 )