diff --git a/data_structures/heap/heap.py b/data_structures/heap/heap.py index 7614e3d7f500..bf2c14c40dc9 100644 --- a/data_structures/heap/heap.py +++ b/data_structures/heap/heap.py @@ -2,18 +2,15 @@ from abc import abstractmethod from collections.abc import Iterable -from typing import Protocol, TypeVar +from typing import Protocol class Comparable(Protocol): @abstractmethod - def __gt__(self: T, other: T, /) -> bool: + def __gt__(self, other: object, /) -> bool: pass -T = TypeVar("T", bound=Comparable) - - class Heap[T: Comparable]: """A Max Heap Implementation