Skip to content

Commit c0575fe

Browse files
Drop redundant module-level TypeVar, bind Comparable to __gt__
1 parent e3996bb commit c0575fe

1 file changed

Lines changed: 2 additions & 7 deletions

File tree

‎sorts/odd_even_sort.py‎

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,10 @@
55
"""
66

77
from collections.abc import MutableSequence
8-
from typing import Any, Protocol, TypeVar
9-
8+
from typing import Any, Protocol
109

1110
class Comparable(Protocol):
12-
def __lt__(self, other: Any, /) -> bool: ...
13-
14-
15-
T = TypeVar("T", bound="Comparable")
16-
11+
def __gt__(self, other: Any, /) -> bool: ...
1712

1813
def odd_even_sort[T: Comparable](collection: MutableSequence[T]) -> MutableSequence[T]:
1914
"""

0 commit comments

Comments
 (0)