-
-
Notifications
You must be signed in to change notification settings - Fork 44
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4c1a6cc
commit 3416a96
Showing
6 changed files
with
49 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
from __future__ import annotations | ||
|
||
from typing import List, Literal | ||
from typing_extensions import TypedDict, NotRequired | ||
|
||
from .common import LightUser, Color | ||
|
||
|
||
class Player(TypedDict): | ||
color: Color | ||
user: NotRequired[LightUser] | ||
ai: NotRequired[int] | ||
rating: NotRequired[int] | ||
seconds: int | ||
|
||
|
||
class FeaturedData(TypedDict): | ||
id: str | ||
orientation: Color | ||
players: List[Player] | ||
fen: str | ||
|
||
|
||
class MoveData(TypedDict): | ||
fen: str | ||
lm: str | ||
wc: int | ||
bc: int | ||
|
||
|
||
class TVFeed(TypedDict): | ||
t: Literal["featured", "fen"] | ||
d: FeaturedData | MoveData |