diff --git a/sorts/bubble_sort.py b/sorts/bubble_sort.py index e8e7ac5a1565..b1a99f674e00 100644 --- a/sorts/bubble_sort.py +++ b/sorts/bubble_sort.py @@ -1,13 +1,10 @@ -from typing import Any, Protocol, TypeVar +from typing import Any, Protocol class Comparable(Protocol): def __lt__(self, other: Any, /) -> bool: ... -T = TypeVar("T", bound=Comparable) - - def bubble_sort_iterative[T: Comparable](collection: list[T]) -> list[T]: """Pure implementation of the bubble sort algorithm in Python (iterative).