-
Notifications
You must be signed in to change notification settings - Fork 4
Closed
Description
Code:
from wypp import *
@record
class Course:
name: str
teacher: str
students: tuple[str, ...]
@record(mutable=True)
class CourseM:
name: str
teacher: str
students: tuple[str, ...]
@record
class Semester:
degreeProgram: str
semester: str
courses: 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.
Reactions are currently unavailable