mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 04:54:47 +08:00
_typeshed: add SupportsLessThan, SupportsLessThanT (#4711)
And use it everywhere. Note there seemed to be a discrepancy between heapq in Python 2 and 3, so I changed that. It should probably be more widely used within heapq, but leaving that out of scope for this PR. Co-authored-by: hauntsaninja <>
This commit is contained in:
@@ -65,9 +65,6 @@ class _SupportsIndex(Protocol):
|
||||
class _SupportsTrunc(Protocol):
|
||||
def __trunc__(self) -> int: ...
|
||||
|
||||
class _SupportsLessThan(Protocol):
|
||||
def __lt__(self, __other: Any) -> bool: ...
|
||||
|
||||
_T = TypeVar("_T")
|
||||
_T_co = TypeVar("_T_co", covariant=True)
|
||||
_KT = TypeVar("_KT")
|
||||
@@ -79,7 +76,6 @@ _T3 = TypeVar("_T3")
|
||||
_T4 = TypeVar("_T4")
|
||||
_T5 = TypeVar("_T5")
|
||||
_TT = TypeVar("_TT", bound="type")
|
||||
_SupportsLessThanT = TypeVar("_SupportsLessThanT", bound=_SupportsLessThan)
|
||||
_TBE = TypeVar("_TBE", bound="BaseException")
|
||||
|
||||
class object:
|
||||
|
||||
Reference in New Issue
Block a user