@@ -82,7 +82,7 @@ _T3 = TypeVar("_T3")
82
82
_T4 = TypeVar ("_T4" )
83
83
_T5 = TypeVar ("_T5" )
84
84
_TT = TypeVar ("_TT" , bound = "type" )
85
- _LT = TypeVar ("_LT " , bound = _SupportsLessThan )
85
+ _SupportsLessThanT = TypeVar ("_SupportsLessThanT " , bound = _SupportsLessThan )
86
86
_TBE = TypeVar ("_TBE" , bound = "BaseException" )
87
87
88
88
class object :
@@ -962,7 +962,7 @@ class list(MutableSequence[_T], Generic[_T]):
962
962
def reverse (self ) -> None : ...
963
963
if sys .version_info >= (3 ,):
964
964
@overload
965
- def sort (self : List [_LT ], * , key : None = ..., reverse : bool = ...) -> None : ...
965
+ def sort (self : List [_SupportsLessThanT ], * , key : None = ..., reverse : bool = ...) -> None : ...
966
966
@overload
967
967
def sort (self , * , key : Callable [[_T ], _SupportsLessThan ], reverse : bool = ...) -> None : ...
968
968
else :
@@ -1440,17 +1440,19 @@ else:
1440
1440
1441
1441
if sys .version_info >= (3 ,):
1442
1442
@overload
1443
- def max (__arg1 : _LT , __arg2 : _LT , * _args : _LT , key : None = ...) -> _LT : ...
1443
+ def max (
1444
+ __arg1 : _SupportsLessThanT , __arg2 : _SupportsLessThanT , * _args : _SupportsLessThanT , key : None = ...
1445
+ ) -> _SupportsLessThanT : ...
1444
1446
@overload
1445
- def max (__arg1 : _T , __arg2 : _T , * _args : _T , key : Callable [[_T ], _LT ]) -> _T : ...
1447
+ def max (__arg1 : _T , __arg2 : _T , * _args : _T , key : Callable [[_T ], _SupportsLessThanT ]) -> _T : ...
1446
1448
@overload
1447
- def max (__iterable : Iterable [_LT ], * , key : None = ...) -> _LT : ...
1449
+ def max (__iterable : Iterable [_SupportsLessThanT ], * , key : None = ...) -> _SupportsLessThanT : ...
1448
1450
@overload
1449
- def max (__iterable : Iterable [_T ], * , key : Callable [[_T ], _LT ]) -> _T : ...
1451
+ def max (__iterable : Iterable [_T ], * , key : Callable [[_T ], _SupportsLessThanT ]) -> _T : ...
1450
1452
@overload
1451
- def max (__iterable : Iterable [_LT ], * , key : None = ..., default : _T ) -> Union [_LT , _T ]: ...
1453
+ def max (__iterable : Iterable [_SupportsLessThanT ], * , key : None = ..., default : _T ) -> Union [_SupportsLessThanT , _T ]: ...
1452
1454
@overload
1453
- def max (__iterable : Iterable [_T1 ], * , key : Callable [[_T1 ], _LT ], default : _T2 ) -> Union [_T1 , _T2 ]: ...
1455
+ def max (__iterable : Iterable [_T1 ], * , key : Callable [[_T1 ], _SupportsLessThanT ], default : _T2 ) -> Union [_T1 , _T2 ]: ...
1454
1456
1455
1457
else :
1456
1458
@overload
@@ -1460,17 +1462,19 @@ else:
1460
1462
1461
1463
if sys .version_info >= (3 ,):
1462
1464
@overload
1463
- def min (__arg1 : _LT , __arg2 : _LT , * _args : _LT , key : None = ...) -> _LT : ...
1465
+ def min (
1466
+ __arg1 : _SupportsLessThanT , __arg2 : _SupportsLessThanT , * _args : _SupportsLessThanT , key : None = ...
1467
+ ) -> _SupportsLessThanT : ...
1464
1468
@overload
1465
- def min (__arg1 : _T , __arg2 : _T , * _args : _T , key : Callable [[_T ], _LT ]) -> _T : ...
1469
+ def min (__arg1 : _T , __arg2 : _T , * _args : _T , key : Callable [[_T ], _SupportsLessThanT ]) -> _T : ...
1466
1470
@overload
1467
- def min (__iterable : Iterable [_LT ], * , key : None = ...) -> _LT : ...
1471
+ def min (__iterable : Iterable [_SupportsLessThanT ], * , key : None = ...) -> _SupportsLessThanT : ...
1468
1472
@overload
1469
- def min (__iterable : Iterable [_T ], * , key : Callable [[_T ], _LT ]) -> _T : ...
1473
+ def min (__iterable : Iterable [_T ], * , key : Callable [[_T ], _SupportsLessThanT ]) -> _T : ...
1470
1474
@overload
1471
- def min (__iterable : Iterable [_LT ], * , key : None = ..., default : _T ) -> Union [_LT , _T ]: ...
1475
+ def min (__iterable : Iterable [_SupportsLessThanT ], * , key : None = ..., default : _T ) -> Union [_SupportsLessThanT , _T ]: ...
1472
1476
@overload
1473
- def min (__iterable : Iterable [_T1 ], * , key : Callable [[_T1 ], _LT ], default : _T2 ) -> Union [_T1 , _T2 ]: ...
1477
+ def min (__iterable : Iterable [_T1 ], * , key : Callable [[_T1 ], _SupportsLessThanT ], default : _T2 ) -> Union [_T1 , _T2 ]: ...
1474
1478
1475
1479
else :
1476
1480
@overload
@@ -1671,7 +1675,7 @@ def setattr(__obj: Any, __name: Text, __value: Any) -> None: ...
1671
1675
1672
1676
if sys .version_info >= (3 ,):
1673
1677
@overload
1674
- def sorted (__iterable : Iterable [_LT ], * , key : None = ..., reverse : bool = ...) -> List [_LT ]: ...
1678
+ def sorted (__iterable : Iterable [_SupportsLessThanT ], * , key : None = ..., reverse : bool = ...) -> List [_SupportsLessThanT ]: ...
1675
1679
@overload
1676
1680
def sorted (__iterable : Iterable [_T ], * , key : Callable [[_T ], _SupportsLessThan ], reverse : bool = ...) -> List [_T ]: ...
1677
1681
0 commit comments