Skip to content

Commit 55b5a1c

Browse files
committed
add comment, remove ignore, remove test
1 parent 3bfe027 commit 55b5a1c

File tree

2 files changed

+4
-10
lines changed

2 files changed

+4
-10
lines changed

stdlib/@tests/test_cases/builtins/check_type.py

Lines changed: 0 additions & 8 deletions
This file was deleted.

stdlib/builtins.pyi

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -226,8 +226,10 @@ class type:
226226
@classmethod
227227
def __prepare__(metacls, name: str, bases: tuple[type, ...], /, **kwds: Any) -> MutableMapping[str, object]: ...
228228
if sys.version_info >= (3, 10):
229-
def __or__(self, value: Any, /) -> types.UnionType | Self: ... # type: ignore[misc]
230-
def __ror__(self, value: Any, /) -> types.UnionType | Self: ... # type: ignore[misc]
229+
# `int | str` produces an instance of `UnionType`, but `int | int` produces an instance of `type`,
230+
# and `abc.ABC | abc.ABC` produces an instance of `abc.ABCMeta`.
231+
def __or__(self: _typeshed.Self, value: Any, /) -> types.UnionType | _typeshed.Self: ...
232+
def __ror__(self: _typeshed.Self, value: Any, /) -> types.UnionType | _typeshed.Self: ...
231233
if sys.version_info >= (3, 12):
232234
__type_params__: tuple[TypeVar | ParamSpec | TypeVarTuple, ...]
233235
__annotations__: dict[str, AnnotationForm]

0 commit comments

Comments
 (0)