Docs: datapackage typing (#1229)

* Docs: add ClassVar marker to World class

* Docs: add typing to network_data_package
This commit is contained in:
Fabian Dill
2022-11-28 02:25:53 +01:00
committed by GitHub
parent ff1f5569e7
commit 67be80e59d
4 changed files with 34 additions and 22 deletions

View File

@@ -92,7 +92,7 @@ def generate(race=False):
return render_template("generate.html", race=race, version=__version__)
def gen_game(gen_options, meta: Optional[Dict[str, Any]] = None, owner=None, sid=None):
def gen_game(gen_options: dict, meta: Optional[Dict[str, Any]] = None, owner=None, sid=None):
if not meta:
meta: Dict[str, Any] = {}

View File

@@ -22,7 +22,7 @@ def get_db_data(known_games: typing.Set[str]) -> typing.Tuple[typing.Counter[str
typing.DefaultDict[datetime.date, typing.Dict[str, int]]]:
games_played = defaultdict(Counter)
total_games = Counter()
cutoff = date.today()-timedelta(days=30)
cutoff = date.today() - timedelta(days=30)
room: Room
for room in select(room for room in Room if room.creation_time >= cutoff):
for slot in room.seed.slots: