mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 21:46:42 +08:00
Big diff: Use new "|" union syntax (#5872)
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import queue
|
||||
import sys
|
||||
from typing import Any, Generic, Optional, TypeVar
|
||||
from typing import Any, Generic, TypeVar
|
||||
|
||||
if sys.version_info >= (3, 9):
|
||||
from types import GenericAlias
|
||||
@@ -11,8 +11,8 @@ class Queue(queue.Queue[_T]):
|
||||
# FIXME: `ctx` is a circular dependency and it's not actually optional.
|
||||
# It's marked as such to be able to use the generic Queue in __init__.pyi.
|
||||
def __init__(self, maxsize: int = ..., *, ctx: Any = ...) -> None: ...
|
||||
def get(self, block: bool = ..., timeout: Optional[float] = ...) -> _T: ...
|
||||
def put(self, obj: _T, block: bool = ..., timeout: Optional[float] = ...) -> None: ...
|
||||
def get(self, block: bool = ..., timeout: float | None = ...) -> _T: ...
|
||||
def put(self, obj: _T, block: bool = ..., timeout: float | None = ...) -> None: ...
|
||||
def qsize(self) -> int: ...
|
||||
def empty(self) -> bool: ...
|
||||
def full(self) -> bool: ...
|
||||
|
||||
Reference in New Issue
Block a user