Skip to content

Commit 24fe4a2

Browse files
committed
Change type.__dict__ to a proper attribute
Closes: #11033
1 parent aa15f4c commit 24fe4a2

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

stdlib/builtins.pyi

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,8 +189,9 @@ class type:
189189
__bases__: tuple[type, ...]
190190
@property
191191
def __basicsize__(self) -> int: ...
192-
@property
193-
def __dict__(self) -> types.MappingProxyType[str, Any]: ... # type: ignore[override]
192+
# type.__dict__ is read-only at runtime, but that can't be expressed currently.
193+
# See https://github.com/python/typeshed/issues/11033 for a discussion.
194+
__dict__: ClassVar[types.MappingProxyType[str, Any]] # type: ignore[override]
194195
@property
195196
def __dictoffset__(self) -> int: ...
196197
@property

0 commit comments

Comments
 (0)