mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 04:54:47 +08:00
21 lines
661 B
Python
21 lines
661 B
Python
import sys
|
|
from typing import Any, Generic, TypeVar
|
|
|
|
if sys.version_info >= (3, 9):
|
|
from types import GenericAlias
|
|
|
|
_T = TypeVar("_T")
|
|
|
|
class Empty(Exception): ...
|
|
|
|
class SimpleQueue(Generic[_T]):
|
|
def __init__(self) -> None: ...
|
|
def empty(self) -> bool: ...
|
|
def get(self, block: bool = True, timeout: float | None = None) -> _T: ...
|
|
def get_nowait(self) -> _T: ...
|
|
def put(self, item: _T, block: bool = True, timeout: float | None = None) -> None: ...
|
|
def put_nowait(self, item: _T) -> None: ...
|
|
def qsize(self) -> int: ...
|
|
if sys.version_info >= (3, 9):
|
|
def __class_getitem__(cls, item: Any, /) -> GenericAlias: ...
|