Skip to content

Commit 8d9470d

Browse files
author
Mikhail Koviazin
authored
Merge pull request #139 from spyinx/fix-copy-param-typing
update typing for copy
2 parents 1eec818 + 8af8b4a commit 8d9470d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

valkey/commands/core.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1662,7 +1662,7 @@ def copy(
16621662
self,
16631663
source: str,
16641664
destination: str,
1665-
destination_db: Union[str, None] = None,
1665+
destination_db: Optional[Union[int, str]] = None,
16661666
replace: bool = False,
16671667
) -> ResponseT:
16681668
"""
@@ -2032,7 +2032,7 @@ def msetnx(self, mapping: Mapping[AnyKeyT, EncodableT]) -> ResponseT:
20322032
items.extend(pair)
20332033
return self.execute_command("MSETNX", *items)
20342034

2035-
def move(self, name: KeyT, db: int) -> ResponseT:
2035+
def move(self, name: KeyT, db: Union[str, int]) -> ResponseT:
20362036
"""
20372037
Moves the key ``name`` to a different Valkey database ``db``
20382038

0 commit comments

Comments
 (0)