🐛 Fix typo

This commit is contained in:
xtaodada 2023-09-30 19:30:01 +08:00
parent c7bd82e731
commit fae6125ca1
Signed by: xtaodada
GPG Key ID: 4CBB3F4FA8C85659
4 changed files with 6 additions and 6 deletions

View File

@ -60,7 +60,7 @@ class BadRequest(SIMNetException):
return f"{type(self).__name__}({repr(response)})"
@property
def response(self) -> dict[str, Union[str, Any, None]]:
def response(self) -> Dict[str, Union[str, Any, None]]:
return {"retcode": self.ret_code, "message": self.original}
@property

View File

@ -198,7 +198,7 @@ class PartialGenshinUserStats(APIModel):
if not v:
return None
if isinstance(v, dict):
return cast("dict[str, Any]", v)
return cast("Dict[str, Any]", v)
return {**v[0], "realms": v}

View File

@ -1,5 +1,5 @@
"""Starrail chronicle activity."""
from typing import List, Optional
from typing import List, Optional, Dict
from simnet.models.base import APIModel
from simnet.models.starrail.character import ActivityCharacter
@ -139,7 +139,7 @@ class StarRailActivity(APIModel):
activities: List
def find_activity(self, key: str) -> Optional[dict]:
def find_activity(self, key: str) -> Optional[Dict]:
"""Find an activity by key."""
for activity in self.activities:
if list(activity.keys())[0] == key:

View File

@ -1,4 +1,4 @@
from typing import List, Optional
from typing import List, Optional, Dict
from simnet.models.base import APIModel
@ -50,7 +50,7 @@ class StarRailResident(APIModel):
residents: List
def find_resident(self, key: str) -> Optional[dict]:
def find_resident(self, key: str) -> Optional[Dict]:
"""Find a resident by key."""
for resident in self.residents:
if list(resident.keys())[0] == key: