diff --git a/odevzdavatko/views.py b/odevzdavatko/views.py index d3c74812..684b790b 100644 --- a/odevzdavatko/views.py +++ b/odevzdavatko/views.py @@ -125,7 +125,7 @@ class TabulkaOdevzdanychReseniView(ListView): ctx = super().get_context_data(*args, **kwargs) ctx['problemy'] = self.problemy ctx['resitele'] = self.resitele - tabulka = dict() + tabulka: dict[m.Problem, dict[m.Resitel, SouhrnReseni]] = dict() def pridej_reseni(problem, resitel, body, cas): if problem not in tabulka: @@ -145,11 +145,11 @@ class TabulkaOdevzdanychReseniView(ListView): for resitel in hodnoceni.reseni.resitele.all(): pridej_reseni(hodnoceni.problem, resitel, hodnoceni.body, hodnoceni.reseni.cas_doruceni) - hodnoty = [] - resitele_do_tabulky = [] + hodnoty: list[list[SouhrnReseni]] = [] + resitele_do_tabulky: list[m.Resitel] = [] for resitel in self.resitele: dostal_body = False - resiteluv_radek = [] + resiteluv_radek: list[SourhnReseni] = [] # podle pořadí v self.problemy, pokud daný problém neřešil, pak None for problem in self.problemy: if problem in tabulka and resitel in tabulka[problem]: resiteluv_radek.append(tabulka[problem][resitel])