Skip to content

Commit

Permalink
fix things
Browse files Browse the repository at this point in the history
  • Loading branch information
fidoriel committed Oct 16, 2023
1 parent c8068ce commit 4afa513
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions evap/results/exporters.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
)
Expand Down Expand Up @@ -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")

Expand Down

0 comments on commit 4afa513

Please sign in to comment.