mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 13:34:58 +08:00
Switch to PEP-604 syntax in python2 stubs (#5915)
Signed-off-by: oleg.hoefling <oleg.hoefling@gmail.com>
This commit is contained in:
@@ -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: ...
|
||||
|
||||
Reference in New Issue
Block a user