From 10eea71e4e9b9e2b284a9094e86acb2f6130ffee Mon Sep 17 00:00:00 2001 From: root Date: Thu, 5 Dec 2024 18:17:24 +0800 Subject: [PATCH 1/2] update typing for copy Signed-off-by: root --- valkey/commands/core.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/valkey/commands/core.py b/valkey/commands/core.py index d66bed7c..f0b7a895 100644 --- a/valkey/commands/core.py +++ b/valkey/commands/core.py @@ -1662,7 +1662,7 @@ def copy( self, source: str, destination: str, - destination_db: Union[str, None] = None, + destination_db: Optional[Union[int, str]] = None, replace: bool = False, ) -> ResponseT: """ From 8af8b4aa2bdebe6668b9b1824004ed38e3bd5543 Mon Sep 17 00:00:00 2001 From: root Date: Thu, 5 Dec 2024 18:50:39 +0800 Subject: [PATCH 2/2] update typing for move Signed-off-by: root --- valkey/commands/core.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/valkey/commands/core.py b/valkey/commands/core.py index f0b7a895..35af510c 100644 --- a/valkey/commands/core.py +++ b/valkey/commands/core.py @@ -2032,7 +2032,7 @@ def msetnx(self, mapping: Mapping[AnyKeyT, EncodableT]) -> ResponseT: items.extend(pair) return self.execute_command("MSETNX", *items) - def move(self, name: KeyT, db: int) -> ResponseT: + def move(self, name: KeyT, db: Union[str, int]) -> ResponseT: """ Moves the key ``name`` to a different Valkey database ``db``