mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 13:04:46 +08:00
redis: Improve typing of xadd/xdel (#10531)
typing copied from https://redis-py.readthedocs.io/en/stable/commands.html#redis.commands.cluster.RedisClusterCommands.xadd https://redis-py.readthedocs.io/en/stable/commands.html#redis.commands.cluster.RedisClusterCommands.xdel
This commit is contained in:
@@ -862,8 +862,8 @@ class StreamCommands:
|
||||
def xack(self, name, groupname, *ids): ...
|
||||
def xadd(
|
||||
self,
|
||||
name,
|
||||
fields,
|
||||
name: KeyT,
|
||||
fields: Mapping[bytes | memoryview | str | float, bytes | memoryview | str | float],
|
||||
id: str | int | bytes | memoryview = "*",
|
||||
maxlen=None,
|
||||
approximate: bool = True,
|
||||
@@ -894,7 +894,7 @@ class StreamCommands:
|
||||
force=False,
|
||||
justid=False,
|
||||
): ...
|
||||
def xdel(self, name, *ids): ...
|
||||
def xdel(self, name: KeyT, *ids: str | int | bytes | memoryview): ...
|
||||
def xgroup_create(self, name, groupname, id: str = "$", mkstream: bool = False, entries_read: int | None = None): ...
|
||||
def xgroup_delconsumer(self, name, groupname, consumername): ...
|
||||
def xgroup_destroy(self, name, groupname): ...
|
||||
@@ -928,8 +928,8 @@ class AsyncStreamCommands:
|
||||
async def xack(self, name, groupname, *ids): ...
|
||||
async def xadd(
|
||||
self,
|
||||
name,
|
||||
fields,
|
||||
name: KeyT,
|
||||
fields: Mapping[bytes | memoryview | str | float, bytes | memoryview | str | float],
|
||||
id: str | int | bytes | memoryview = "*",
|
||||
maxlen=None,
|
||||
approximate: bool = True,
|
||||
@@ -960,7 +960,7 @@ class AsyncStreamCommands:
|
||||
force=False,
|
||||
justid=False,
|
||||
): ...
|
||||
async def xdel(self, name, *ids): ...
|
||||
async def xdel(self, name: KeyT, *ids: str | int | bytes | memoryview): ...
|
||||
async def xgroup_create(self, name, groupname, id: str = "$", mkstream: bool = False, entries_read: int | None = None): ...
|
||||
async def xgroup_delconsumer(self, name, groupname, consumername): ...
|
||||
async def xgroup_destroy(self, name, groupname): ...
|
||||
|
||||
Reference in New Issue
Block a user