Skip to content

Commit 0d5352b

Browse files
committed
Pyright, ty, and Pyrefly handle frozen
``` import attrs @attrs.frozen class C: x: int i = C(42) i.x = 23 ``` /Users/hynek/FOSS/attrs/t.py /Users/hynek/FOSS/attrs/t.py:9:3 - error: Cannot assign to attribute "x" for class "C"   Attribute "x" is read-only (reportAttributeAccessIssue) 1 error, 0 warnings, 0 informations
1 parent 92081e0 commit 0d5352b

1 file changed

Lines changed: 0 additions & 2 deletions

File tree

docs/types.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,6 @@ Pyright has grown several *attrs*-specific features over the years, but its infe
108108
- Our auto-aliasing of private attributes is not supported.
109109
You have to manually tell Pyright about it: `_x: int = attrs.field(alias="x")`
110110

111-
- The `attrs.frozen` decorator is not typed with frozen attributes, which are properly typed via `attrs.define(frozen=True)`.
112-
113111
- None of the decorator-based features (like `@_x.default` or `@_x.validator`) are supported.
114112

115113
Your constructive feedback is welcome in both [attrs#795](https://github.com/python-attrs/attrs/issues/795) and [pyright#1782](https://github.com/microsoft/pyright/discussions/1782).

0 commit comments

Comments
 (0)