@@ -82,19 +82,22 @@ class SupportsNext(Protocol[_T_co]):
82
82
class SupportsAnext (Protocol [_T_co ]):
83
83
def __anext__ (self ) -> Awaitable [_T_co ]: ...
84
84
85
+ class SupportsBool (Protocol ):
86
+ def __bool__ (self ) -> bool : ...
87
+
85
88
# Comparison protocols
86
89
87
90
class SupportsDunderLT (Protocol [_T_contra ]):
88
- def __lt__ (self , other : _T_contra , / ) -> bool : ...
91
+ def __lt__ (self , other : _T_contra , / ) -> SupportsBool : ...
89
92
90
93
class SupportsDunderGT (Protocol [_T_contra ]):
91
- def __gt__ (self , other : _T_contra , / ) -> bool : ...
94
+ def __gt__ (self , other : _T_contra , / ) -> SupportsBool : ...
92
95
93
96
class SupportsDunderLE (Protocol [_T_contra ]):
94
- def __le__ (self , other : _T_contra , / ) -> bool : ...
97
+ def __le__ (self , other : _T_contra , / ) -> SupportsBool : ...
95
98
96
99
class SupportsDunderGE (Protocol [_T_contra ]):
97
- def __ge__ (self , other : _T_contra , / ) -> bool : ...
100
+ def __ge__ (self , other : _T_contra , / ) -> SupportsBool : ...
98
101
99
102
class SupportsAllComparisons (
100
103
SupportsDunderLT [Any ], SupportsDunderGT [Any ], SupportsDunderLE [Any ], SupportsDunderGE [Any ], Protocol
0 commit comments