mirror of
https://github.com/TheAlgorithms/Python.git
synced 2025-07-21 20:47:10 +08:00
Various ruff fixes (#12821)
This commit is contained in:
@ -2,7 +2,7 @@ from __future__ import annotations
|
||||
|
||||
from abc import abstractmethod
|
||||
from collections.abc import Iterable
|
||||
from typing import Generic, Protocol, TypeVar
|
||||
from typing import Protocol, TypeVar
|
||||
|
||||
|
||||
class Comparable(Protocol):
|
||||
@ -22,7 +22,7 @@ class Comparable(Protocol):
|
||||
T = TypeVar("T", bound=Comparable)
|
||||
|
||||
|
||||
class Heap(Generic[T]):
|
||||
class Heap[T: Comparable]:
|
||||
"""A Max Heap Implementation
|
||||
|
||||
>>> unsorted = [103, 9, 1, 7, 11, 15, 25, 201, 209, 107, 5]
|
||||
|
Reference in New Issue
Block a user