mirror of
https://github.com/astral-sh/ruff.git
synced 2026-11-21 20:29:20 +08:00
210 B
210 B
Classes shadowing
Implicit error
class C: ...
C = 1 # error: [invalid-assignment]
Explicit
No diagnostic is raised in the case of explicit shadowing:
class C: ...
C: int = 1