Skip to content

[red-knot] Out-of-body (re-)definitions of class variables #15456

Closed
@sharkdp

Description

(Re-)definitions of class variables outside the body of the class are currently not checked:

class C:
    c: str = "foo"

C.c = 1  # <-- no error here

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingred-knotMulti-file analysis & type inference

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions