@@ -8,6 +8,8 @@ from _typeshed import (
8
8
OpenTextMode ,
9
9
ReadableBuffer ,
10
10
SupportsKeysAndGetItem ,
11
+ SupportsLessThan ,
12
+ SupportsLessThanT ,
11
13
SupportsWrite ,
12
14
)
13
15
from abc import ABCMeta
@@ -67,9 +69,6 @@ class _SupportsIndex(Protocol):
67
69
class _SupportsTrunc (Protocol ):
68
70
def __trunc__ (self ) -> int : ...
69
71
70
- class _SupportsLessThan (Protocol ):
71
- def __lt__ (self , __other : Any ) -> bool : ...
72
-
73
72
_T = TypeVar ("_T" )
74
73
_T_co = TypeVar ("_T_co" , covariant = True )
75
74
_KT = TypeVar ("_KT" )
@@ -81,7 +80,6 @@ _T3 = TypeVar("_T3")
81
80
_T4 = TypeVar ("_T4" )
82
81
_T5 = TypeVar ("_T5" )
83
82
_TT = TypeVar ("_TT" , bound = "type" )
84
- _SupportsLessThanT = TypeVar ("_SupportsLessThanT" , bound = _SupportsLessThan )
85
83
_TBE = TypeVar ("_TBE" , bound = "BaseException" )
86
84
87
85
class object :
@@ -714,9 +712,9 @@ class list(MutableSequence[_T], Generic[_T]):
714
712
def remove (self , __value : _T ) -> None : ...
715
713
def reverse (self ) -> None : ...
716
714
@overload
717
- def sort (self : List [_SupportsLessThanT ], * , key : None = ..., reverse : bool = ...) -> None : ...
715
+ def sort (self : List [SupportsLessThanT ], * , key : None = ..., reverse : bool = ...) -> None : ...
718
716
@overload
719
- def sort (self , * , key : Callable [[_T ], _SupportsLessThan ], reverse : bool = ...) -> None : ...
717
+ def sort (self , * , key : Callable [[_T ], SupportsLessThan ], reverse : bool = ...) -> None : ...
720
718
def __len__ (self ) -> int : ...
721
719
def __iter__ (self ) -> Iterator [_T ]: ...
722
720
def __str__ (self ) -> str : ...
@@ -1024,32 +1022,32 @@ def map(
1024
1022
) -> Iterator [_S ]: ...
1025
1023
@overload
1026
1024
def max (
1027
- __arg1 : _SupportsLessThanT , __arg2 : _SupportsLessThanT , * _args : _SupportsLessThanT , key : None = ...
1028
- ) -> _SupportsLessThanT : ...
1025
+ __arg1 : SupportsLessThanT , __arg2 : SupportsLessThanT , * _args : SupportsLessThanT , key : None = ...
1026
+ ) -> SupportsLessThanT : ...
1029
1027
@overload
1030
- def max (__arg1 : _T , __arg2 : _T , * _args : _T , key : Callable [[_T ], _SupportsLessThanT ]) -> _T : ...
1028
+ def max (__arg1 : _T , __arg2 : _T , * _args : _T , key : Callable [[_T ], SupportsLessThanT ]) -> _T : ...
1031
1029
@overload
1032
- def max (__iterable : Iterable [_SupportsLessThanT ], * , key : None = ...) -> _SupportsLessThanT : ...
1030
+ def max (__iterable : Iterable [SupportsLessThanT ], * , key : None = ...) -> SupportsLessThanT : ...
1033
1031
@overload
1034
- def max (__iterable : Iterable [_T ], * , key : Callable [[_T ], _SupportsLessThanT ]) -> _T : ...
1032
+ def max (__iterable : Iterable [_T ], * , key : Callable [[_T ], SupportsLessThanT ]) -> _T : ...
1035
1033
@overload
1036
- def max (__iterable : Iterable [_SupportsLessThanT ], * , key : None = ..., default : _T ) -> Union [_SupportsLessThanT , _T ]: ...
1034
+ def max (__iterable : Iterable [SupportsLessThanT ], * , key : None = ..., default : _T ) -> Union [SupportsLessThanT , _T ]: ...
1037
1035
@overload
1038
- def max (__iterable : Iterable [_T1 ], * , key : Callable [[_T1 ], _SupportsLessThanT ], default : _T2 ) -> Union [_T1 , _T2 ]: ...
1036
+ def max (__iterable : Iterable [_T1 ], * , key : Callable [[_T1 ], SupportsLessThanT ], default : _T2 ) -> Union [_T1 , _T2 ]: ...
1039
1037
@overload
1040
1038
def min (
1041
- __arg1 : _SupportsLessThanT , __arg2 : _SupportsLessThanT , * _args : _SupportsLessThanT , key : None = ...
1042
- ) -> _SupportsLessThanT : ...
1039
+ __arg1 : SupportsLessThanT , __arg2 : SupportsLessThanT , * _args : SupportsLessThanT , key : None = ...
1040
+ ) -> SupportsLessThanT : ...
1043
1041
@overload
1044
- def min (__arg1 : _T , __arg2 : _T , * _args : _T , key : Callable [[_T ], _SupportsLessThanT ]) -> _T : ...
1042
+ def min (__arg1 : _T , __arg2 : _T , * _args : _T , key : Callable [[_T ], SupportsLessThanT ]) -> _T : ...
1045
1043
@overload
1046
- def min (__iterable : Iterable [_SupportsLessThanT ], * , key : None = ...) -> _SupportsLessThanT : ...
1044
+ def min (__iterable : Iterable [SupportsLessThanT ], * , key : None = ...) -> SupportsLessThanT : ...
1047
1045
@overload
1048
- def min (__iterable : Iterable [_T ], * , key : Callable [[_T ], _SupportsLessThanT ]) -> _T : ...
1046
+ def min (__iterable : Iterable [_T ], * , key : Callable [[_T ], SupportsLessThanT ]) -> _T : ...
1049
1047
@overload
1050
- def min (__iterable : Iterable [_SupportsLessThanT ], * , key : None = ..., default : _T ) -> Union [_SupportsLessThanT , _T ]: ...
1048
+ def min (__iterable : Iterable [SupportsLessThanT ], * , key : None = ..., default : _T ) -> Union [SupportsLessThanT , _T ]: ...
1051
1049
@overload
1052
- def min (__iterable : Iterable [_T1 ], * , key : Callable [[_T1 ], _SupportsLessThanT ], default : _T2 ) -> Union [_T1 , _T2 ]: ...
1050
+ def min (__iterable : Iterable [_T1 ], * , key : Callable [[_T1 ], SupportsLessThanT ], default : _T2 ) -> Union [_T1 , _T2 ]: ...
1053
1051
@overload
1054
1052
def next (__i : Iterator [_T ]) -> _T : ...
1055
1053
@overload
@@ -1209,9 +1207,9 @@ def round(number: SupportsRound[_T], ndigits: None) -> int: ...
1209
1207
def round (number : SupportsRound [_T ], ndigits : int ) -> _T : ...
1210
1208
def setattr (__obj : Any , __name : str , __value : Any ) -> None : ...
1211
1209
@overload
1212
- def sorted (__iterable : Iterable [_SupportsLessThanT ], * , key : None = ..., reverse : bool = ...) -> List [_SupportsLessThanT ]: ...
1210
+ def sorted (__iterable : Iterable [SupportsLessThanT ], * , key : None = ..., reverse : bool = ...) -> List [SupportsLessThanT ]: ...
1213
1211
@overload
1214
- def sorted (__iterable : Iterable [_T ], * , key : Callable [[_T ], _SupportsLessThan ], reverse : bool = ...) -> List [_T ]: ...
1212
+ def sorted (__iterable : Iterable [_T ], * , key : Callable [[_T ], SupportsLessThan ], reverse : bool = ...) -> List [_T ]: ...
1215
1213
1216
1214
if sys .version_info >= (3 , 8 ):
1217
1215
@overload
0 commit comments