Big diff: Use new "|" union syntax (#5872)

This commit is contained in:
Akuli
2021-08-08 12:05:21 +03:00
committed by GitHub
parent b9adb7a874
commit ee487304d7
578 changed files with 8080 additions and 8966 deletions

View File

@@ -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: ...