File tree Expand file tree Collapse file tree 3 files changed +8
-3
lines changed Expand file tree Collapse file tree 3 files changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -237,7 +237,6 @@ asyncio.locks.Condition.release
237237builtins.memoryview.__contains__ # C type that implements __getitem__
238238builtins.reveal_locals # Builtins that type checkers pretends exist
239239builtins.reveal_type # Builtins that type checkers pretends exist
240- builtins.type.__dict__ # read-only but not actually a property; stubtest thinks it's a mutable attribute.
241240
242241# The following CodecInfo properties are added in __new__
243242codecs.CodecInfo.decode
Original file line number Diff line number Diff line change 1+ class Meta (type ): ...
2+
3+
4+ call = Meta .__dict__ ["__call__" ]
Original file line number Diff line number Diff line change @@ -42,6 +42,7 @@ from typing import ( # noqa: Y022,UP035
4242 Any ,
4343 BinaryIO ,
4444 ClassVar ,
45+ Final ,
4546 Generic ,
4647 Mapping ,
4748 MutableMapping ,
@@ -189,8 +190,9 @@ class type:
189190 __bases__ : tuple [type , ...]
190191 @property
191192 def __basicsize__ (self ) -> int : ...
192- @property
193- def __dict__ (self ) -> types .MappingProxyType [str , Any ]: ... # type: ignore[override]
193+ # type.__dict__ is read-only at runtime, but that can't be expressed currently.
194+ # See https://github.com/python/typeshed/issues/11033 for a discussion.
195+ __dict__ : Final [types .MappingProxyType [str , Any ]] # type: ignore[assignment]
194196 @property
195197 def __dictoffset__ (self ) -> int : ...
196198 @property
You can’t perform that action at this time.
0 commit comments