We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cb03bdd commit 2404932Copy full SHA for 2404932
backend/utils/server_info.py
@@ -7,7 +7,6 @@
7
8
from datetime import datetime, timedelta
9
from datetime import timezone as tz
10
-from typing import Dict, List
11
12
import psutil
13
@@ -103,7 +102,7 @@ def get_mem_info() -> dict[str, float]:
103
102
}
104
105
@staticmethod
106
- def get_sys_info() -> Dict[str, str]:
+ def get_sys_info() -> dict[str, str]:
107
"""获取服务器信息"""
108
hostname = socket.gethostname()
109
ip = '127.0.0.1'
@@ -124,7 +123,7 @@ def get_sys_info() -> Dict[str, str]:
124
123
125
126
127
- def get_disk_info() -> List[Dict[str, str]]:
+ def get_disk_info() -> list[dict[str, str]]:
128
"""获取磁盘信息"""
129
disk_info = []
130
for partition in psutil.disk_partitions(all=False):
0 commit comments