From 4afa5134e444bfbe29748669da3a89e75c5beea1 Mon Sep 17 00:00:00 2001 From: fidoriel <49869342+fidoriel@users.noreply.github.com> Date: Mon, 16 Oct 2023 20:36:23 +0200 Subject: [PATCH] fix things --- evap/results/exporters.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/evap/results/exporters.py b/evap/results/exporters.py index 7325c3f56a..a82f1253cd 100644 --- a/evap/results/exporters.py +++ b/evap/results/exporters.py @@ -157,7 +157,7 @@ def filter_evaluations( if evaluation.course_evaluations_count > 1: # type: ignore[attr-defined] course_results_exist = True weight_sum = sum(evaluation.weight for evaluation in evaluation.course.evaluations.all()) - evaluation.weight_percentage = int((evaluation.weight / weight_sum) * 100) # type: ignore + evaluation.weight_percentage = int((evaluation.weight / weight_sum) * 100) # type: ignore[attr-defined] evaluation.course.avg_grade = distribution_to_grade( # type: ignore[attr-defined] calculate_average_course_distribution(evaluation.course) ) @@ -241,8 +241,8 @@ def write_overall_results( self.write_cell(_("Evaluation weight"), "bold") weight_percentages: Generator[str | None, None, None] = ( - f"{e.weight_percentage}%" if gt1 else None - for e, gt1 in zip(evaluations, count_gt_1) # type: ignore[attr-defined] + f"{e.weight_percentage}%" if gt1 else None # type: ignore[attr-defined] + for e, gt1 in zip(evaluations, count_gt_1) ) self.write_row(weight_percentages, lambda s: "evaluation_weight" if s is not None else "default")