Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion stdlib/@tests/stubtest_allowlists/common.txt
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,6 @@ asyncio.locks.Condition.release
builtins.memoryview.__contains__ # C type that implements __getitem__
builtins.reveal_locals # Builtins that type checkers pretends exist
builtins.reveal_type # Builtins that type checkers pretends exist
builtins.type.__dict__ # read-only but not actually a property; stubtest thinks it's a mutable attribute.

# The following CodecInfo properties are added in __new__
codecs.CodecInfo.decode
Expand Down
4 changes: 4 additions & 0 deletions stdlib/@tests/test_cases/builtins/check_type.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
class Meta(type): ...


call = Meta.__dict__["__call__"]
6 changes: 4 additions & 2 deletions stdlib/builtins.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ from typing import ( # noqa: Y022,UP035
Any,
BinaryIO,
ClassVar,
Final,
Generic,
Mapping,
MutableMapping,
Expand Down Expand Up @@ -189,8 +190,9 @@ class type:
__bases__: tuple[type, ...]
@property
def __basicsize__(self) -> int: ...
@property
def __dict__(self) -> types.MappingProxyType[str, Any]: ... # type: ignore[override]
# type.__dict__ is read-only at runtime, but that can't be expressed currently.
# See https://github.com/python/typeshed/issues/11033 for a discussion.
__dict__: Final[types.MappingProxyType[str, Any]] # type: ignore[assignment]
@property
def __dictoffset__(self) -> int: ...
@property
Expand Down