Code:
fromwyppimport*@recordclassCourse:
name: strteacher: strstudents: tuple[str, ...]
@record(mutable=True)classCourseM:
name: strteacher: strstudents: tuple[str, ...]
@recordclassSemester:
degreeProgram: strsemester: strcourses: tuple[CourseM, ...]
prog1=Course('Programmierung 1', 'Wehr', ())
semester1_2020=Semester('AKI', '1. Semester 2020/21', (prog1, ))Error:
untypy.error.UntypyTypeError
given: Course(name='Programmierung 1', teacher='Wehr', students=())
expected: value of type CourseM
context: Semester(degreeProgram: str, semester: str, courses: tuple[CourseM, ...]) -> Self
^^^^^^^
declared at:
caused by: test.py:22
22 | semester1_2020 = Semester('AKI', '1. Semester 2020/21', (prog1, ))
The error is correct, but the "declared at" part is missing.
Code:
Error:
The error is correct, but the "declared at" part is missing.