Skip to content

Commit 11e06fd

Browse files
committed
refactor(heap): remove redundant TypeVar in Heap
1 parent 8747434 commit 11e06fd

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

‎data_structures/heap/heap.py‎

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,15 @@
22

33
from abc import abstractmethod
44
from collections.abc import Iterable
5-
from typing import Protocol, TypeVar
5+
from typing import Protocol
66

77

88
class Comparable(Protocol):
99
@abstractmethod
10-
def __gt__(self: T, other: T, /) -> bool:
10+
def __gt__(self, other: object, /) -> bool:
1111
pass
1212

1313

14-
T = TypeVar("T", bound=Comparable)
15-
16-
1714
class Heap[T: Comparable]:
1815
"""A Max Heap Implementation
1916

0 commit comments

Comments
 (0)