mirror of
https://github.com/astral-sh/ruff.git
synced 2025-10-02 22:55:08 +00:00
![]() ## Summary Add a diagnostic if a pure instance variable is accessed on a class object. For example ```py class C: instance_only: str def __init__(self): self.instance_only = "a" # error: Attribute `instance_only` can only be accessed on instances, not on the class object `Literal[C]` itself. C.instance_only ``` --------- Co-authored-by: David Peter <mail@david-peter.de> |
||
---|---|---|
.. | ||
mdtest | ||
README.md |
Markdown files within the mdtest/
subdirectory are tests of type inference and type checking;
executed by the tests/mdtest.rs
integration test.
See crates/red_knot_test/README.md
for documentation of this test format.