各种 Anti-warning 合规性改动

This commit is contained in:
Remik1r3n
2025-02-03 03:00:26 +08:00
parent d194556eee
commit a11d5b1246
17 changed files with 59 additions and 91 deletions

View File

@@ -4,7 +4,7 @@ import json
from API_TitleServer import apiSDGB
def apiGetUserData(userId:int) -> str:
'''已弃用,将逐步淘汰'''
"""已弃用,将逐步淘汰"""
logger.info("apiGetUserData 已弃用,将逐步淘汰。")
# 构建 Payload
data = json.dumps({
@@ -16,7 +16,7 @@ def apiGetUserData(userId:int) -> str:
return userdata_result
def apiGetUserThing(userId:int, thing:str, noLog=False) -> str:
'''获取用户数据的 API 请求器,返回 Json String'''
"""获取用户数据的 API 请求器,返回 Json String"""
# 构建 Payload
data = json.dumps({
"userId": userId
@@ -27,7 +27,7 @@ def apiGetUserThing(userId:int, thing:str, noLog=False) -> str:
return userthing_result
def implGetUser_(thing:str, userId:int, noLog=False) -> dict:
'''获取用户某些数据的 API 实现,返回 Dict'''
"""获取用户某些数据的 API 实现,返回 Dict"""
# 获取 Json String
userthing_result = apiGetUserThing(userId, thing, noLog)
# 转换为 Dict