ruff/crates/red_knot_python_semantic
David Peter f349dab4fc
[red-knot] Invalid assignments to attributes (#15613)
## Summary

Raise "invalid-assignment" diagnostics for incorrect assignments to
attributes, for example:

```py
class C:
    var: str = "a"

C.var = 1  # error: "Object of type `Literal[1]` is not assignable to `str`"
```

closes #15456 

## Test Plan

- Updated test assertions
- New test for assignments to module-attributes
2025-01-22 10:42:47 +01:00
..
resources [red-knot] Invalid assignments to attributes (#15613) 2025-01-22 10:42:47 +01:00
src [red-knot] Invalid assignments to attributes (#15613) 2025-01-22 10:42:47 +01:00
tests mdtest: include test name in printed rerun command (#14684) 2024-11-30 11:01:06 +00:00
Cargo.toml `type: ignore[codes]` and `knot: ignore` (#15078) 2024-12-23 10:52:43 +01:00
build.rs Modernize build scripts (#13837) 2024-10-20 22:35:35 +01:00
mdtest.py [red-knot] mdtest runner: include stderr for crashing tests (#15644) 2025-01-21 14:59:36 +00:00
mdtest.py.lock [red-knot] Markdown test runner (#15632) 2025-01-21 14:06:35 +01:00