Skip to content

Commit 2404932

Browse files
committed
Fix typing
1 parent cb03bdd commit 2404932

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

backend/utils/server_info.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77

88
from datetime import datetime, timedelta
99
from datetime import timezone as tz
10-
from typing import Dict, List
1110

1211
import psutil
1312

@@ -103,7 +102,7 @@ def get_mem_info() -> dict[str, float]:
103102
}
104103

105104
@staticmethod
106-
def get_sys_info() -> Dict[str, str]:
105+
def get_sys_info() -> dict[str, str]:
107106
"""获取服务器信息"""
108107
hostname = socket.gethostname()
109108
ip = '127.0.0.1'
@@ -124,7 +123,7 @@ def get_sys_info() -> Dict[str, str]:
124123
}
125124

126125
@staticmethod
127-
def get_disk_info() -> List[Dict[str, str]]:
126+
def get_disk_info() -> list[dict[str, str]]:
128127
"""获取磁盘信息"""
129128
disk_info = []
130129
for partition in psutil.disk_partitions(all=False):

0 commit comments

Comments
 (0)