Skip to content

Commit

Permalink
fix black and pyright errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Anupya committed Oct 23, 2023
1 parent 3e46bb3 commit 9fc7355
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
6 changes: 2 additions & 4 deletions berserk/clients/challenges.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def create(
color: Color | None = None,
variant: Variant | None = None,
position: str | None = None,
) -> Challenge:
) -> Dict[str, Any]:
"""Challenge another player to a game.
:param username: username of the player to challenge
Expand Down Expand Up @@ -173,9 +173,7 @@ def accept(self, challenge_id: str) -> None:
path = f"/api/challenge/{challenge_id}/accept"
self._r.post(path)

def decline(
self, challenge_id: str, reason: DeclineReason = "generic"
) -> None:
def decline(self, challenge_id: str, reason: DeclineReason = "generic") -> None:
"""Decline an incoming challenge.
:param challenge_id: ID of a challenge
Expand Down
3 changes: 2 additions & 1 deletion berserk/types/challenges.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@

class User(TypedDict):
"""Challenge User"""

rating: NotRequired[float]
provisional: NotRequired[bool]
online: NotRequired[bool]
Expand All @@ -55,6 +56,7 @@ class User(TypedDict):

class Variant(TypedDict):
"""Information about a challenge variant."""

key: NotRequired[VariantKey]
name: NotRequired[str]
short: NotRequired[str]
Expand Down Expand Up @@ -115,4 +117,3 @@ class Challenge(TypedDict):
initialFen: NotRequired[str]
declineReason: str
declineReasonKey: str

0 comments on commit 9fc7355

Please sign in to comment.