Switch to PEP-604 syntax in python2 stubs (#5915)

Signed-off-by: oleg.hoefling <oleg.hoefling@gmail.com>
This commit is contained in:
Oleg Höfling
2021-08-14 11:12:30 +02:00
committed by GitHub
parent 431c4f7fc1
commit ff63953188
235 changed files with 2473 additions and 2768 deletions

View File

@@ -1,4 +1,4 @@
from typing import Any, Hashable, Iterable, Iterator, MutableMapping, Optional, TypeVar, Union
from typing import Any, Hashable, Iterable, Iterator, MutableMapping, TypeVar, Union
_T = TypeVar("_T")
_Setlike = Union[BaseSet[_T], Iterable[_T]]
@@ -33,11 +33,11 @@ class BaseSet(Iterable[_T]):
def __gt__(self, other: BaseSet[_T]) -> bool: ...
class ImmutableSet(BaseSet[_T], Hashable):
def __init__(self, iterable: Optional[_Setlike[_T]] = ...) -> None: ...
def __init__(self, iterable: _Setlike[_T] | None = ...) -> None: ...
def __hash__(self) -> int: ...
class Set(BaseSet[_T]):
def __init__(self, iterable: Optional[_Setlike[_T]] = ...) -> None: ...
def __init__(self, iterable: _Setlike[_T] | None = ...) -> None: ...
def __ior__(self: _SelfT, other: BaseSet[_T]) -> _SelfT: ...
def union_update(self, other: _Setlike[_T]) -> None: ...
def __iand__(self: _SelfT, other: BaseSet[_T]) -> _SelfT: ...