From 32b750b6aa2396cdaa757da16da8cd8fb627c09f Mon Sep 17 00:00:00 2001 From: Mehdi ABAAKOUK Date: Tue, 22 Aug 2023 14:28:15 +0200 Subject: [PATCH] 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 --- stubs/redis/redis/commands/core.pyi | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/stubs/redis/redis/commands/core.pyi b/stubs/redis/redis/commands/core.pyi index 9f96fe591..437e93bee 100644 --- a/stubs/redis/redis/commands/core.pyi +++ b/stubs/redis/redis/commands/core.pyi @@ -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): ...