Skip to content

"declared at" part is empty #18

@skogsbaer

Description

@skogsbaer

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.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions