ruff/crates/red_knot_python_semantic/resources/mdtest/scopes
David Peter 6771b8ebd2
[red-knot] Pure instance variables declared in class body (#15515)
## Summary

This is a small, tentative step towards the bigger goal of understanding
instance attributes.

- Adds partial support for pure instance variables declared in the class
  body, i.e. this case:
  ```py
  class C:
      variable1: str = "a"
      variable2 = "b"

  reveal_type(C().variable1)  # str
  reveal_type(C().variable2)  # Unknown | Literal["b"]
  ```
- Adds `property` as a known class to query for `@property` decorators
- Splits up various `@Todo(instance attributes)` cases into
  sub-categories.

## Test Plan

Modified existing MD tests.
2025-01-17 10:48:20 +01:00
..
builtin.md Sync vendored typeshed stubs (#14977) 2024-12-15 01:02:41 +00:00
moduletype_attrs.md [red-knot] Pure instance variables declared in class body (#15515) 2025-01-17 10:48:20 +01:00
nonlocal.md Migrate some inference tests to mdtests (#14795) 2024-12-06 11:19:22 +01:00
unbound.md Display Union of Literals as a Literal (#14993) 2025-01-08 00:58:38 +00:00