From 6e7f8ac0caaebbbe79230572a1784aad38cce8ec Mon Sep 17 00:00:00 2001 From: ishkong <19740260+ishkong@users.noreply.github.com> Date: Sat, 10 Feb 2024 23:49:34 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B:=20Fix=20missing=20parameters=20fo?= =?UTF-8?q?r=20new=20players=20(#3)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 🐛: Make more parameters nullable * 🔖: Bump to 1.3.2 * 🐛: Make more and more parameters nullable --- pyproject.toml | 2 +- starrail_damage_cal/mihomo/models.py | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 4792fef..d421a3c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "starrail_damage_cal" -version = "1.3.1" +version = "1.3.2" description = "For StarRail Role Damage Cal" authors = [ {name = "qwerdvd", email = "105906879+qwerdvd@users.noreply.github.com"}, diff --git a/starrail_damage_cal/mihomo/models.py b/starrail_damage_cal/mihomo/models.py index bf175cb..6030751 100644 --- a/starrail_damage_cal/mihomo/models.py +++ b/starrail_damage_cal/mihomo/models.py @@ -47,31 +47,31 @@ class Challenge(Struct): class ChallengeInfo(Struct): - scheduleMaxLevel: int + scheduleMaxLevel: Union[int, None] = None scheduleGroupId: Union[int, None] = None noneScheduleMaxLevel: Union[int, None] = None class PlayerSpaceInfo(Struct): - maxRogueChallengeScore: int - equipmentCount: int avatarCount: int - achievementCount: int challengeInfo: ChallengeInfo + achievementCount: Union[int, None] = field(default=0) + equipmentCount: Union[int, None] = field(default=0) + maxRogueChallengeScore: Union[int, None] = field(default=0) class PlayerDetailInfo(Struct): assistAvatarList: Union[List[Avatar], None] platform: Union[int, str] isDisplayAvatar: bool - avatarDetailList: Union[List[Avatar], None] uid: int - friendCount: int - worldLevel: int nickname: str level: int recordInfo: Union[PlayerSpaceInfo, None] headIcon: int + friendCount: Union[int, None] = field(default=0) + worldLevel: Union[int, None] = field(default=0) + avatarDetailList: Union[List[Avatar], None] = None signature: Union[str, None] = None Birthday: Union[int, None] = None