diff --git a/README.md b/README.md
index 57f25c7..e2ea91c 100644
--- a/README.md
+++ b/README.md
@@ -8,6 +8,9 @@
+
+
+
diff --git a/database/user.py b/database/user.py
index dd01c87..4fe29da 100644
--- a/database/user.py
+++ b/database/user.py
@@ -35,7 +35,7 @@ class CUserDB(CSqlManager):
point (int): 农场币
Returns:
- Union[bool, str]: False 表示失败,字符串表示成功信息
+ bool | str: False 表示失败,字符串表示成功信息
"""
nowStr = g_pToolManager.dateTime().date().today().strftime("%Y-%m-%d")
sql = (
@@ -55,7 +55,7 @@ class CUserDB(CSqlManager):
"""获取所有用户UID列表
Returns:
- List[str]: 用户UID列表
+ list[str]: 用户UID列表
"""
cursor = await cls.m_pDB.execute("SELECT uid FROM user")
rows = await cursor.fetchall()
diff --git a/database/userSoil.py b/database/userSoil.py
index 87a315e..cd0e7c5 100644
--- a/database/userSoil.py
+++ b/database/userSoil.py
@@ -244,7 +244,7 @@ class CUserSoilDB(CSqlManager):
soilIndex (int): 土地索引
Returns:
- Optional[dict]: 记录存在返回字段-值字典,否则返回 None
+ dict: 记录存在返回字段-值字典,否则返回 None
"""
async with cls._transaction():
cursor = await cls.m_pDB.execute(
@@ -266,7 +266,7 @@ class CUserSoilDB(CSqlManager):
soilIndex (int): 土地索引
Returns:
- Optional[dict]: 记录存在返回字段-值字典,否则返回 None
+ dict | None: 记录存在返回字段-值字典,否则返回 None
"""
cursor = await cls.m_pDB.execute(
"SELECT * FROM userSoil WHERE uid = ? AND soilIndex = ?",
diff --git a/farm/farm.py b/farm/farm.py
index ee9735d..25d8531 100644
--- a/farm/farm.py
+++ b/farm/farm.py
@@ -243,10 +243,16 @@ class CFarmManager:
soilInfo = await g_pDBService.userSoil.getUserSoil(uid, i)
if soilInfo:
- if soilInfo["soilLevel"] == 1:
- iconPath = g_sResourcePath / "soil/红土地.png"
- else:
- iconPath = g_sResourcePath / "soil/普通土地.png"
+ match soilInfo.get("soilLevel", 0):
+ case 1:
+ name = "红土地.png"
+ case 2:
+ name = "黑土地.png"
+ case 3:
+ name = "金土地.png"
+ case _:
+ name = "普通土地.png"
+ iconPath = g_sResourcePath / "soil" / name
if iconPath.exists():
icon = (iconPath, 33, 33)
diff --git a/request.py b/request.py
index 9ca28ac..5eae182 100644
--- a/request.py
+++ b/request.py
@@ -31,7 +31,7 @@ class CRequestManager:
params: dict | None = None,
jsonData: dict | None = None,
) -> bool:
- """下载文件到指定路径并覆盖已存在的文件,并显示下载进度条
+ """下载文件到指定路径并覆盖已存在的文件
Args:
url (str): 文件的下载链接
@@ -210,7 +210,6 @@ class CRequestManager:
# 重命名为 sign_in.json
g_pToolManager.renameFile(f"{path}/signTemp.json", "sign_in.json")
return True
-
except Exception as e:
logger.error("下载签到文件失败", e=e)
return False