Skip to content

Commit 096cf56

Browse files
authored
Revert "Let SupportsDunderLT return SupportsBool instead of `bool… (#14373)
Revert "Let `SupportsDunderLT` return `SupportsBool` instead of `bool`. (#12939)" This reverts commit aed8025.
1 parent edc3e3a commit 096cf56

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

stdlib/_typeshed/__init__.pyi

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -82,22 +82,19 @@ class SupportsNext(Protocol[_T_co]):
8282
class SupportsAnext(Protocol[_T_co]):
8383
def __anext__(self) -> Awaitable[_T_co]: ...
8484

85-
class SupportsBool(Protocol):
86-
def __bool__(self) -> bool: ...
87-
8885
# Comparison protocols
8986

9087
class SupportsDunderLT(Protocol[_T_contra]):
91-
def __lt__(self, other: _T_contra, /) -> SupportsBool: ...
88+
def __lt__(self, other: _T_contra, /) -> bool: ...
9289

9390
class SupportsDunderGT(Protocol[_T_contra]):
94-
def __gt__(self, other: _T_contra, /) -> SupportsBool: ...
91+
def __gt__(self, other: _T_contra, /) -> bool: ...
9592

9693
class SupportsDunderLE(Protocol[_T_contra]):
97-
def __le__(self, other: _T_contra, /) -> SupportsBool: ...
94+
def __le__(self, other: _T_contra, /) -> bool: ...
9895

9996
class SupportsDunderGE(Protocol[_T_contra]):
100-
def __ge__(self, other: _T_contra, /) -> SupportsBool: ...
97+
def __ge__(self, other: _T_contra, /) -> bool: ...
10198

10299
class SupportsAllComparisons(
103100
SupportsDunderLT[Any], SupportsDunderGT[Any], SupportsDunderLE[Any], SupportsDunderGE[Any], Protocol

0 commit comments

Comments
 (0)