mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-09 21:46:42 +08:00
Redis: Add missing exported names (#10151)
This commit is contained in:
@@ -19,6 +19,7 @@ redis.sentinel.Sentinel.slave_for
|
||||
# Metaclass differs:
|
||||
redis.RedisCluster
|
||||
redis.asyncio.Redis
|
||||
redis.asyncio.RedisCluster
|
||||
redis.asyncio.client.MonitorCommandInfo
|
||||
redis.asyncio.client.Pipeline
|
||||
redis.asyncio.client.Redis
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
from . import client, connection, credentials, exceptions, sentinel, utils
|
||||
from . import backoff, client, connection, credentials, exceptions, sentinel, utils
|
||||
from .cluster import RedisCluster as RedisCluster
|
||||
|
||||
__all__ = [
|
||||
@@ -13,6 +13,7 @@ __all__ = [
|
||||
"CredentialProvider",
|
||||
"DataError",
|
||||
"from_url",
|
||||
"default_backoff",
|
||||
"InvalidResponse",
|
||||
"PubSubError",
|
||||
"ReadOnlyError",
|
||||
@@ -32,6 +33,8 @@ __all__ = [
|
||||
"WatchError",
|
||||
]
|
||||
|
||||
default_backoff = backoff.default_backoff
|
||||
|
||||
Redis = client.Redis
|
||||
|
||||
BlockingConnectionPool = connection.BlockingConnectionPool
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
from redis.asyncio.client import Redis as Redis, StrictRedis as StrictRedis
|
||||
from redis.asyncio.cluster import RedisCluster as RedisCluster
|
||||
from redis.asyncio.connection import (
|
||||
BlockingConnectionPool as BlockingConnectionPool,
|
||||
Connection as Connection,
|
||||
@@ -6,6 +7,7 @@ from redis.asyncio.connection import (
|
||||
SSLConnection as SSLConnection,
|
||||
UnixDomainSocketConnection as UnixDomainSocketConnection,
|
||||
)
|
||||
from redis.asyncio.parser import CommandsParser as CommandsParser
|
||||
from redis.asyncio.sentinel import (
|
||||
Sentinel as Sentinel,
|
||||
SentinelConnectionPool as SentinelConnectionPool,
|
||||
@@ -13,6 +15,7 @@ from redis.asyncio.sentinel import (
|
||||
SentinelManagedSSLConnection as SentinelManagedSSLConnection,
|
||||
)
|
||||
from redis.asyncio.utils import from_url as from_url
|
||||
from redis.backoff import default_backoff as default_backoff
|
||||
from redis.exceptions import (
|
||||
AuthenticationError as AuthenticationError,
|
||||
AuthenticationWrongNumberOfArgsError as AuthenticationWrongNumberOfArgsError,
|
||||
@@ -35,15 +38,18 @@ __all__ = [
|
||||
"BlockingConnectionPool",
|
||||
"BusyLoadingError",
|
||||
"ChildDeadlockedError",
|
||||
"CommandsParser",
|
||||
"Connection",
|
||||
"ConnectionError",
|
||||
"ConnectionPool",
|
||||
"DataError",
|
||||
"from_url",
|
||||
"default_backoff",
|
||||
"InvalidResponse",
|
||||
"PubSubError",
|
||||
"ReadOnlyError",
|
||||
"Redis",
|
||||
"RedisCluster",
|
||||
"RedisError",
|
||||
"ResponseError",
|
||||
"Sentinel",
|
||||
|
||||
@@ -27,3 +27,5 @@ class EqualJitterBackoff(AbstractBackoff):
|
||||
class DecorrelatedJitterBackoff(AbstractBackoff):
|
||||
def __init__(self, cap: float = 0.512, base: float = 0.008) -> None: ...
|
||||
def compute(self, failures: int) -> float: ...
|
||||
|
||||
def default_backoff() -> EqualJitterBackoff: ...
|
||||
|
||||
Reference in New Issue
Block a user