🚑 语法适配到python3.8以上

This commit is contained in:
yajiwa
2023-04-22 21:14:51 +08:00
parent 03cfeb22d8
commit 8c65caf35f
7 changed files with 35 additions and 35 deletions
+3 -3
View File
@@ -1,4 +1,4 @@
from typing import Dict, List, Optional, Tuple
from typing import Dict, List, Optional, Tuple, Union
from tortoise import fields
@@ -145,7 +145,7 @@ class GoodsInfo(Model):
@classmethod
async def add_user_daily_purchase(
cls, goods: "GoodsInfo", user_id_: int, group_id_: int, num: int = 1
cls, goods: "GoodsInfo", user_id_: Union[int, str], group_id_: Union[int, str], num: int = 1
):
"""
说明:
@@ -168,7 +168,7 @@ class GoodsInfo(Model):
@classmethod
async def check_user_daily_purchase(
cls, goods: "GoodsInfo", user_id_: int, group_id_: int, num: int = 1
cls, goods: "GoodsInfo", user_id_: Union[int, str], group_id_: Union[int, str], num: int = 1
) -> Tuple[bool, int]:
"""
说明: