Config: read task toughness

This commit is contained in:
Théophile Bastian 2023-02-26 16:29:28 +01:00
parent 87ffdee417
commit 1686293337

View file

@ -11,6 +11,7 @@ class Task:
name: str name: str
qualified_name: str qualified_name: str
descr: str descr: str
tough: int
notes: str notes: str
time: str time: str
nb_groups: int nb_groups: int
@ -89,6 +90,7 @@ class Config:
name=task["nom"], name=task["nom"],
qualified_name=qual_name, qualified_name=qual_name,
descr=task["descr"].format(**self.env), descr=task["descr"].format(**self.env),
tough=int(task["penible"]),
notes=task.get("notes", ""), notes=task.get("notes", ""),
time=task.get("heure", ""), time=task.get("heure", ""),
nb_groups=int(task.get("nb_groupes", 1)), nb_groups=int(task.get("nb_groupes", 1)),