mirror of
https://github.com/PaiGramTeam/SIMNet.git
synced 2024-11-16 03:55:28 +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)})"
|
return f"{type(self).__name__}({repr(response)})"
|
||||||
|
|
||||||
@property
|
@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}
|
return {"retcode": self.ret_code, "message": self.original}
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
@ -198,7 +198,7 @@ class PartialGenshinUserStats(APIModel):
|
|||||||
if not v:
|
if not v:
|
||||||
return None
|
return None
|
||||||
if isinstance(v, dict):
|
if isinstance(v, dict):
|
||||||
return cast("dict[str, Any]", v)
|
return cast("Dict[str, Any]", v)
|
||||||
return {**v[0], "realms": v}
|
return {**v[0], "realms": v}
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
"""Starrail chronicle activity."""
|
"""Starrail chronicle activity."""
|
||||||
from typing import List, Optional
|
from typing import List, Optional, Dict
|
||||||
|
|
||||||
from simnet.models.base import APIModel
|
from simnet.models.base import APIModel
|
||||||
from simnet.models.starrail.character import ActivityCharacter
|
from simnet.models.starrail.character import ActivityCharacter
|
||||||
@ -139,7 +139,7 @@ class StarRailActivity(APIModel):
|
|||||||
|
|
||||||
activities: List
|
activities: List
|
||||||
|
|
||||||
def find_activity(self, key: str) -> Optional[dict]:
|
def find_activity(self, key: str) -> Optional[Dict]:
|
||||||
"""Find an activity by key."""
|
"""Find an activity by key."""
|
||||||
for activity in self.activities:
|
for activity in self.activities:
|
||||||
if list(activity.keys())[0] == key:
|
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
|
from simnet.models.base import APIModel
|
||||||
|
|
||||||
@ -50,7 +50,7 @@ class StarRailResident(APIModel):
|
|||||||
|
|
||||||
residents: List
|
residents: List
|
||||||
|
|
||||||
def find_resident(self, key: str) -> Optional[dict]:
|
def find_resident(self, key: str) -> Optional[Dict]:
|
||||||
"""Find a resident by key."""
|
"""Find a resident by key."""
|
||||||
for resident in self.residents:
|
for resident in self.residents:
|
||||||
if list(resident.keys())[0] == key:
|
if list(resident.keys())[0] == key:
|
||||||
|
Loading…
Reference in New Issue
Block a user