Reduce use of deprecated typing aliases (#6358)

This commit is contained in:
Alex Waygood
2021-11-23 09:56:43 +00:00
committed by GitHub
parent 7e836db2f3
commit c685c2d6c6
19 changed files with 64 additions and 61 deletions

View File

@@ -1,5 +1,6 @@
import builtins
from datetime import datetime, timedelta
from typing import Any, Callable, Generic, Iterable, Iterator, Mapping, Sequence, Set, Text, Type, TypeVar, Union, overload
from typing import Any, Callable, Generic, Iterable, Iterator, Mapping, Sequence, Text, Type, TypeVar, Union, overload
from typing_extensions import Literal
from .connection import ConnectionPool
@@ -569,12 +570,12 @@ class Redis(Generic[_StrType]):
def zscan_iter(self, name, match=..., count=..., score_cast_func=...): ...
def sadd(self, name: _Key, *values: _Value) -> int: ...
def scard(self, name: _Key) -> int: ...
def sdiff(self, keys: _Key | Iterable[_Key], *args: _Key) -> Set[_Value]: ...
def sdiff(self, keys: _Key | Iterable[_Key], *args: _Key) -> builtins.set[_Value]: ...
def sdiffstore(self, dest: _Key, keys: _Key | Iterable[_Key], *args: _Key) -> int: ...
def sinter(self, keys: _Key | Iterable[_Key], *args: _Key) -> Set[_Value]: ...
def sinter(self, keys: _Key | Iterable[_Key], *args: _Key) -> builtins.set[_Value]: ...
def sinterstore(self, dest: _Key, keys: _Key | Iterable[_Key], *args: _Key) -> int: ...
def sismember(self, name: _Key, value: _Value) -> bool: ...
def smembers(self, name: _Key) -> Set[_StrType]: ...
def smembers(self, name: _Key) -> builtins.set[_StrType]: ...
def smove(self, src: _Key, dst: _Key, value: _Value) -> bool: ...
@overload
def spop(self, name: _Key, count: None = ...) -> _Value | None: ...
@@ -585,7 +586,7 @@ class Redis(Generic[_StrType]):
@overload
def srandmember(self, name: _Key, number: int) -> list[_Value]: ...
def srem(self, name: _Key, *values: _Value) -> int: ...
def sunion(self, keys: _Key | Iterable[_Key], *args: _Key) -> Set[_Value]: ...
def sunion(self, keys: _Key | Iterable[_Key], *args: _Key) -> builtins.set[_Value]: ...
def sunionstore(self, dest: _Key, keys: _Key | Iterable[_Key], *args: _Key) -> int: ...
def xack(self, name, groupname, *ids): ...
def xadd(self, name, fields, id=..., maxlen=..., approximate=...): ...