ruff/crates/ty_python_semantic/resources/mdtest/shadowing/class.md

223 B

Classes shadowing

Implicit error

class C: ...

C = 1  # error: "Implicit shadowing of class `C`"

Explicit

No diagnostic is raised in the case of explicit shadowing:

class C: ...

C: int = 1