ezKit 2.0.26__tar.gz → 2.0.28__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ezKit
3
- Version: 2.0.26
3
+ Version: 2.0.28
4
4
  Summary: Easy Kit
5
5
  Author: septvean
6
6
  Author-email: septvean@gmail.com
@@ -72,15 +72,15 @@ class BandwagonClient:
72
72
  def format_disk(info: dict) -> str:
73
73
 
74
74
  # 硬盘大小 (单位GB)
75
- total = info["ve_disk_quota_gb"]
75
+ total = int(info["ve_disk_quota_gb"])
76
76
 
77
77
  # 使用量 (单位GB)
78
78
  used = info["ve_used_disk_space_b"] / (1024 * 1024 * 1024)
79
79
 
80
80
  # 使用率
81
- usage = (info["ve_used_disk_space_b"] / (int(info["ve_disk_quota_gb"]) * 1024 * 1024 * 1024)) * 100
81
+ usage = (info["ve_used_disk_space_b"] / (total * 1024 * 1024 * 1024)) * 100
82
82
 
83
- return f"{used:.2f}/{total} GB ({usage:.2f}%)"
83
+ return f"{used:.2f}/{total:.0f} GB ({usage:.2f}%)"
84
84
 
85
85
 
86
86
  def format_bandwidth(info: dict) -> str:
@@ -94,7 +94,7 @@ def format_bandwidth(info: dict) -> str:
94
94
  # 使用率
95
95
  usage = (info["data_counter"] / info["plan_monthly_data"]) * 100
96
96
 
97
- return f"{used:.2f}/{total} GB ({usage:.2f}%)"
97
+ return f"{used:.2f}/{total:.0f} GB ({usage:.2f}%)"
98
98
 
99
99
 
100
100
  def expiration_date(info: dict) -> str:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: ezKit
3
- Version: 2.0.26
3
+ Version: 2.0.28
4
4
  Summary: Easy Kit
5
5
  Author: septvean
6
6
  Author-email: septvean@gmail.com
@@ -4,7 +4,7 @@ from setuptools import find_packages, setup
4
4
 
5
5
  setup(
6
6
  name="ezKit",
7
- version="2.0.26",
7
+ version="2.0.28",
8
8
  author="septvean",
9
9
  author_email="septvean@gmail.com",
10
10
  description="Easy Kit",
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes