mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-05-06 21:43:59 +08:00
add rich comparison bound to heapq and priorityqueues using heapq (#14419)
This commit is contained in:
+3
-2
@@ -1,5 +1,6 @@
|
||||
import sys
|
||||
from _queue import Empty as Empty, SimpleQueue as SimpleQueue
|
||||
from _typeshed import SupportsRichComparisonT
|
||||
from threading import Condition, Lock
|
||||
from types import GenericAlias
|
||||
from typing import Any, Generic, TypeVar
|
||||
@@ -47,8 +48,8 @@ class Queue(Generic[_T]):
|
||||
def task_done(self) -> None: ...
|
||||
def __class_getitem__(cls, item: Any, /) -> GenericAlias: ...
|
||||
|
||||
class PriorityQueue(Queue[_T]):
|
||||
queue: list[_T]
|
||||
class PriorityQueue(Queue[SupportsRichComparisonT]):
|
||||
queue: list[SupportsRichComparisonT]
|
||||
|
||||
class LifoQueue(Queue[_T]):
|
||||
queue: list[_T]
|
||||
|
||||
Reference in New Issue
Block a user