[ty] Use invalid-assignment error code for invalid assignments to ClassVars (#20156)

## Summary

This error is about assigning to attributes rather than reading
attributes, so I think `invalid-assignment` makes more sense than
`invalid-attribute-access`

## Test Plan

existing mdtests updated
This commit is contained in:
Alex Waygood 2025-08-29 18:43:30 +01:00 committed by GitHub
parent fa7798ddd9
commit 9b1b58a451
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 15 additions and 15 deletions

View file

@ -53,7 +53,7 @@ C.attr = 1 # fine
C.attr = "wrong" # error: [invalid-assignment]
instance = C()
instance.attr = 1 # error: [invalid-attribute-access]
instance.attr = 1 # error: [invalid-assignment]
```
## Unknown attributes