Skip to content

Commit f4fb5bc

Browse files
committed
docstrings
1 parent 4dedf5f commit f4fb5bc

1 file changed

Lines changed: 74 additions & 0 deletions

File tree

src/lpdb_python/defs.py

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
"""
2+
Data type wrappers for data from LPDB queries.
3+
"""
4+
15
import json
26

37
from datetime import date, datetime, timedelta, timezone, UTC
@@ -119,6 +123,10 @@ def wiki(self) -> str:
119123

120124

121125
class Broadcasters(LpdbBaseResponseData):
126+
"""
127+
Broadcaster data from LPDB.
128+
"""
129+
122130
@property
123131
def id(self) -> str:
124132
return self._rawGet("id")
@@ -157,6 +165,10 @@ def parent(self) -> str:
157165

158166

159167
class Company(LpdbBaseResponseData):
168+
"""
169+
Company data from LPDB.
170+
"""
171+
160172
@property
161173
def name(self) -> str:
162174
return self._rawGet("name")
@@ -211,6 +223,10 @@ def links(self) -> dict[str, Any]:
211223

212224

213225
class Datapoint(LpdbBaseResponseData):
226+
"""
227+
Generic datapoint from LPDB.
228+
"""
229+
214230
@property
215231
def type(self) -> str:
216232
return self._rawGet("type")
@@ -241,6 +257,10 @@ def date(self) -> Optional[datetime]:
241257

242258

243259
class ExternalMediaLink(LpdbBaseResponseData):
260+
"""
261+
External media link from LPDB.
262+
"""
263+
244264
@property
245265
def title(self) -> str:
246266
return self._rawGet("title")
@@ -275,6 +295,10 @@ def type(self) -> str:
275295

276296

277297
class Match(LpdbBaseResponseData):
298+
"""
299+
Match data from LPDB.
300+
"""
301+
278302
@property
279303
def match2id(self) -> str:
280304
return self._rawGet("match2id")
@@ -348,6 +372,8 @@ def dateexact(self) -> bool:
348372
def timezone(self) -> Optional[timezone]:
349373
"""
350374
Timezone information stored in this match.
375+
376+
The `timezone` property from this property does not support IANA time zones.
351377
"""
352378
if not self.dateexact:
353379
return None
@@ -437,6 +463,10 @@ def match2opponents(self) -> list["MatchOpponent"]:
437463

438464

439465
class MatchGame(LpdbBaseData):
466+
"""
467+
Game data stored in a match.
468+
"""
469+
440470
_parent: "Match"
441471

442472
def __init__(self, parent: "Match", raw: dict[str, Any]):
@@ -520,6 +550,10 @@ def extradata(self) -> Optional[dict[str, Any]]:
520550

521551

522552
class MatchOpponent(LpdbBaseData):
553+
"""
554+
Opponent data stored in a match.
555+
"""
556+
523557
@property
524558
def id(self) -> int:
525559
return self._rawGet("id")
@@ -568,6 +602,10 @@ def extradata(self) -> Optional[dict[str, Any]]:
568602

569603

570604
class Placement(LpdbBaseResponseData):
605+
"""
606+
Placement data from LPDB.
607+
"""
608+
571609
@property
572610
def tournament(self) -> str:
573611
return self._rawGet("tournament")
@@ -678,6 +716,10 @@ def qualifierurl(self) -> str:
678716

679717

680718
class Player(LpdbBaseResponseData):
719+
"""
720+
Player data from LPDB.
721+
"""
722+
681723
@property
682724
def id(self) -> str:
683725
return self._rawGet("id")
@@ -748,6 +790,10 @@ def earningsbyyear(self) -> dict[str, Number]:
748790

749791

750792
class Series(LpdbBaseResponseData):
793+
"""
794+
Tournament series data from LPDB.
795+
"""
796+
751797
@property
752798
def name(self) -> str:
753799
return self._rawGet("name")
@@ -838,6 +884,10 @@ def links(self) -> dict:
838884

839885

840886
class SquadPlayer(LpdbBaseResponseData):
887+
"""
888+
Squad player data from LPDB.
889+
"""
890+
841891
@property
842892
def id(self) -> str:
843893
return self._rawGet("id")
@@ -908,6 +958,10 @@ def inactivedateref(self) -> dict:
908958

909959

910960
class StandingsEntry(LpdbBaseResponseData):
961+
"""
962+
Standings entry from LPDB.
963+
"""
964+
911965
@property
912966
def parent(self) -> str:
913967
return self._rawGet("parent")
@@ -962,6 +1016,10 @@ def slotindex(self) -> dict:
9621016

9631017

9641018
class StandingsTable(LpdbBaseResponseData):
1019+
"""
1020+
Standings table from LPDB.
1021+
"""
1022+
9651023
@property
9661024
def parent(self) -> str:
9671025
return self._rawGet("parent")
@@ -996,6 +1054,10 @@ def config(self) -> dict:
9961054

9971055

9981056
class Team(LpdbBaseResponseData):
1057+
"""
1058+
Team data from LPDB.
1059+
"""
1060+
9991061
@property
10001062
def name(self) -> str:
10011063
return self._rawGet("name")
@@ -1062,6 +1124,10 @@ def links(self) -> dict:
10621124

10631125

10641126
class Tournament(LpdbBaseResponseData):
1127+
"""
1128+
Tournament data from LPDB.
1129+
"""
1130+
10651131
@property
10661132
def name(self) -> str:
10671133
return self._rawGet("name")
@@ -1211,6 +1277,10 @@ def sponsors(self) -> dict:
12111277

12121278

12131279
class Transfer(LpdbBaseResponseData):
1280+
"""
1281+
Transfer data from LPDB.
1282+
"""
1283+
12141284
@property
12151285
def player(self) -> str:
12161286
return self._rawGet("player")
@@ -1257,6 +1327,10 @@ def wholeteam(self) -> bool:
12571327

12581328

12591329
class TeamTemplate(LpdbBaseData):
1330+
"""
1331+
Team template from LPDB.
1332+
"""
1333+
12601334
@property
12611335
def template(self) -> str:
12621336
return self._rawGet("template")

0 commit comments

Comments
 (0)