mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 20:54:28 +08:00
@@ -4,6 +4,7 @@
|
||||
|
||||
from collections import deque
|
||||
from typing import Any, TypeVar, Generic, Optional
|
||||
import sys
|
||||
|
||||
_T = TypeVar('_T')
|
||||
|
||||
@@ -30,3 +31,13 @@ class Queue(Generic[_T]):
|
||||
|
||||
class PriorityQueue(Queue[_T]): ...
|
||||
class LifoQueue(Queue[_T]): ...
|
||||
|
||||
if sys.version_info >= (3, 7):
|
||||
class SimpleQueue(Generic[_T]):
|
||||
def __init__(self) -> None: ...
|
||||
def empty(self) -> bool: ...
|
||||
def get(self, block: bool = ..., timeout: Optional[float] = ...) -> _T: ...
|
||||
def get_nowait(self) -> _T: ...
|
||||
def put(self, item: _T, block: bool = ..., timeout: Optional[float] = ...) -> None: ...
|
||||
def put_nowait(self, item: _T) -> None: ...
|
||||
def qsize(self) -> int: ...
|
||||
|
||||
Reference in New Issue
Block a user