Skip to content

Commit

Permalink
update tuple[int, int] -> tuple[int, optional[int]] for mypy
Browse files Browse the repository at this point in the history
  • Loading branch information
imagine-hussain committed Mar 23, 2023
1 parent 0de44c3 commit ff9ac1d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion backend/algorithms/tests/test_autoplanning.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
from typing import Optional
from pytest import raises
from algorithms.autoplanning import autoplan, terms_between
from algorithms.objects.course import Course
Expand Down Expand Up @@ -129,7 +130,7 @@ def assert_autoplanning_guarantees(uoc_max: list[int], courses: list[Course], pr
course_names = [course[0] for course in res if terms_between((2020, 0), course[1]) == index]
assert number >= sum(get_uoc(course_name, courses) for course_name in course_names)
# all courses valid
plan: list[list[dict[str, tuple[int, int]]]] = [[{}, {}, {}, {}] for _ in range(2023-2020)]
plan: list[list[dict[str, tuple[int, Optional[int]]]]] = [[{}, {}, {}, {}] for _ in range(2023-2020)]
for course_name, (course_year, course_term) in res:
plan[course_year - 2020][course_term][course_name] = (get_uoc(course_name, courses), get_mark(course_name, courses))
assert all(course_state['is_accurate'] for course_state in validate_terms(ValidPlannerData(
Expand Down

0 comments on commit ff9ac1d

Please sign in to comment.