mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-02-28 04:22:21 +08:00
Reduce use of deprecated typing aliases (#6358)
This commit is contained in:
@@ -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=...): ...
|
||||
|
||||
Reference in New Issue
Block a user