Skip to content

Enforce compatible __init__ in structural subtypes #3823

Open
@ilevkivskyi

Description

@ilevkivskyi

Currently, __init__ methods can be incompatible in nominal subclasses. However, it makes sense to check that the __init__ has a correct signature in structural subtypes if the protocol has an explicitly declared __init__. It would be in particular good to check this for types like Type[t].

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions