mirror of
https://github.com/PaiGramTeam/SIMNet.git
synced 2024-11-22 06:17:57 +00:00
🐛 Fix typo
This commit is contained in:
parent
c7bd82e731
commit
fae6125ca1
@ -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
|
||||
|
@ -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}
|
||||
|
||||
|
||||
|
@ -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:
|
||||
|
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user