David Peter
fb15da5694
[red-knot] Add support for typing.ClassVar ( #15550 )
...
## Summary
Add support for `typing.ClassVar`, i.e. emit a diagnostic in this
scenario:
```py
from typing import ClassVar
class C:
x: ClassVar[int] = 1
c = C()
c.x = 3 # error: "Cannot assign to pure class variable `x` from an instance of type `C`"
```
## Test Plan
- New tests for the `typing.ClassVar` qualifier
- Fixed one TODO in `attributes.md`
2025-01-18 13:51:35 +01:00
..
2025-01-17 09:41:06 +01:00
2025-01-18 13:51:35 +01:00
2025-01-17 09:41:06 +01:00
2025-01-17 09:41:06 +01:00
2025-01-17 16:48:01 -08:00
2025-01-17 09:41:06 +01:00
2025-01-17 09:01:58 +00:00
2025-01-17 14:23:02 -05:00
2025-01-15 13:37:52 -05:00
2025-01-17 09:41:06 +01:00
2024-07-03 07:36:46 -05:00
2025-01-15 09:03:38 +01:00
2024-10-23 07:57:53 +02:00
2025-01-03 08:50:13 -06:00
2025-01-11 09:51:58 +01:00
2025-01-17 09:41:06 +01:00
2024-07-18 09:24:58 -07:00
2025-01-17 17:11:00 -05:00
2025-01-17 09:41:06 +01:00
2024-10-20 10:55:36 +02:00
2025-01-17 17:11:00 -05:00
2024-11-15 19:31:15 +01:00
2024-12-12 20:49:54 +01:00
2025-01-17 17:11:00 -05:00
2024-10-28 07:53:41 +00:00
2024-11-29 12:05:05 +00:00
2025-01-16 11:38:15 +05:30
2024-11-15 19:31:15 +01:00
2025-01-16 10:45:24 -05:00
2025-01-04 12:23:53 +01:00
2024-12-23 10:52:43 +01:00
2024-11-15 19:31:15 +01:00
2025-01-15 18:58:28 +05:30
2024-12-11 10:30:41 +00:00
2025-01-16 15:18:12 +01:00
2025-01-16 13:07:26 +00:00
2025-01-16 16:05:10 -06:00