Skip to content

Commit

Permalink
Typing fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Jonxslays committed Nov 26, 2023
1 parent 5641e15 commit d15e123
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
11 changes: 6 additions & 5 deletions wom/serializer.py
Original file line number Diff line number Diff line change
Expand Up @@ -1162,9 +1162,10 @@ def deserialize_group_activity(self, data: DictT) -> models.GroupActivity:

@serializer_guard
def deserialize_social_links(self, data: DictT) -> models.SocialLinks:
links = models.SocialLinks()
self._set_attrs(
links, data, "website", "discord", "twitter", "youtube", "twitch", maybe=True
return models.SocialLinks(
website=data.get("website"),
discord=data.get("discord"),
youtube=data.get("youtube"),
twitter=data.get("twitter"),
twitch=data.get("twitch"),
)

return links
2 changes: 1 addition & 1 deletion wom/services/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def __init__(self, http_service: HttpService, serializer: serializer.Serializer)
self._http = http_service
self._serializer = serializer
self._dict = t.Dict[str, t.Any]
self._list = t.List[self._dict]
self._list = t.List[t.Dict[str, t.Any]]

def _generate_map(self, **kwargs: t.Any) -> t.Dict[str, t.Any]:
return {k: v for k, v in kwargs.items() if v is not None}

0 comments on commit d15e123

Please sign in to comment.