@@ -2792,7 +2792,7 @@ def brpop(
27922792 return self .execute_command ("BRPOP" , * keys )
27932793
27942794 def brpoplpush (
2795- self , src : str , dst : str , timeout : Optional [Number ] = 0
2795+ self , src : KeyT , dst : KeyT , timeout : Optional [Number ] = 0
27962796 ) -> Union [Awaitable [Optional [str ]], Optional [str ]]:
27972797 """
27982798 Pop a value off the tail of ``src``, push it on the head of ``dst``
@@ -2849,7 +2849,7 @@ def lmpop(
28492849 return self .execute_command ("LMPOP" , * cmd_args )
28502850
28512851 def lindex (
2852- self , name : str , index : int
2852+ self , name : KeyT , index : int
28532853 ) -> Union [Awaitable [Optional [str ]], Optional [str ]]:
28542854 """
28552855 Return the item from list ``name`` at position ``index``
@@ -2862,7 +2862,7 @@ def lindex(
28622862 return self .execute_command ("LINDEX" , name , index , keys = [name ])
28632863
28642864 def linsert (
2865- self , name : str , where : str , refvalue : str , value : str
2865+ self , name : KeyT , where : str , refvalue : str , value : str
28662866 ) -> Union [Awaitable [int ], int ]:
28672867 """
28682868 Insert ``value`` in list ``name`` either immediately before or after
@@ -2875,7 +2875,7 @@ def linsert(
28752875 """
28762876 return self .execute_command ("LINSERT" , name , where , refvalue , value )
28772877
2878- def llen (self , name : str ) -> Union [Awaitable [int ], int ]:
2878+ def llen (self , name : KeyT ) -> Union [Awaitable [int ], int ]:
28792879 """
28802880 Return the length of the list ``name``
28812881
@@ -2885,7 +2885,7 @@ def llen(self, name: str) -> Union[Awaitable[int], int]:
28852885
28862886 def lpop (
28872887 self ,
2888- name : str ,
2888+ name : KeyT ,
28892889 count : Optional [int ] = None ,
28902890 ) -> Union [Awaitable [Union [str , List , None ]], Union [str , List , None ]]:
28912891 """
@@ -2902,23 +2902,23 @@ def lpop(
29022902 else :
29032903 return self .execute_command ("LPOP" , name )
29042904
2905- def lpush (self , name : str , * values : FieldT ) -> Union [Awaitable [int ], int ]:
2905+ def lpush (self , name : KeyT , * values : FieldT ) -> Union [Awaitable [int ], int ]:
29062906 """
29072907 Push ``values`` onto the head of the list ``name``
29082908
29092909 For more information, see https://redis.io/commands/lpush
29102910 """
29112911 return self .execute_command ("LPUSH" , name , * values )
29122912
2913- def lpushx (self , name : str , * values : FieldT ) -> Union [Awaitable [int ], int ]:
2913+ def lpushx (self , name : KeyT , * values : FieldT ) -> Union [Awaitable [int ], int ]:
29142914 """
29152915 Push ``value`` onto the head of the list ``name`` if ``name`` exists
29162916
29172917 For more information, see https://redis.io/commands/lpushx
29182918 """
29192919 return self .execute_command ("LPUSHX" , name , * values )
29202920
2921- def lrange (self , name : str , start : int , end : int ) -> Union [Awaitable [list ], list ]:
2921+ def lrange (self , name : KeyT , start : int , end : int ) -> Union [Awaitable [list ], list ]:
29222922 """
29232923 Return a slice of the list ``name`` between
29242924 position ``start`` and ``end``
@@ -2930,7 +2930,7 @@ def lrange(self, name: str, start: int, end: int) -> Union[Awaitable[list], list
29302930 """
29312931 return self .execute_command ("LRANGE" , name , start , end , keys = [name ])
29322932
2933- def lrem (self , name : str , count : int , value : str ) -> Union [Awaitable [int ], int ]:
2933+ def lrem (self , name : KeyT , count : int , value : str ) -> Union [Awaitable [int ], int ]:
29342934 """
29352935 Remove the first ``count`` occurrences of elements equal to ``value``
29362936 from the list stored at ``name``.
@@ -2944,15 +2944,15 @@ def lrem(self, name: str, count: int, value: str) -> Union[Awaitable[int], int]:
29442944 """
29452945 return self .execute_command ("LREM" , name , count , value )
29462946
2947- def lset (self , name : str , index : int , value : str ) -> Union [Awaitable [str ], str ]:
2947+ def lset (self , name : KeyT , index : int , value : str ) -> Union [Awaitable [str ], str ]:
29482948 """
29492949 Set element at ``index`` of list ``name`` to ``value``
29502950
29512951 For more information, see https://redis.io/commands/lset
29522952 """
29532953 return self .execute_command ("LSET" , name , index , value )
29542954
2955- def ltrim (self , name : str , start : int , end : int ) -> Union [Awaitable [str ], str ]:
2955+ def ltrim (self , name : KeyT , start : int , end : int ) -> Union [Awaitable [str ], str ]:
29562956 """
29572957 Trim the list ``name``, removing all values not within the slice
29582958 between ``start`` and ``end``
@@ -2966,7 +2966,7 @@ def ltrim(self, name: str, start: int, end: int) -> Union[Awaitable[str], str]:
29662966
29672967 def rpop (
29682968 self ,
2969- name : str ,
2969+ name : KeyT ,
29702970 count : Optional [int ] = None ,
29712971 ) -> Union [Awaitable [Union [str , List , None ]], Union [str , List , None ]]:
29722972 """
@@ -2983,7 +2983,7 @@ def rpop(
29832983 else :
29842984 return self .execute_command ("RPOP" , name )
29852985
2986- def rpoplpush (self , src : str , dst : str ) -> Union [Awaitable [str ], str ]:
2986+ def rpoplpush (self , src : KeyT , dst : KeyT ) -> Union [Awaitable [str ], str ]:
29872987 """
29882988 RPOP a value off of the ``src`` list and atomically LPUSH it
29892989 on to the ``dst`` list. Returns the value.
@@ -2992,15 +2992,15 @@ def rpoplpush(self, src: str, dst: str) -> Union[Awaitable[str], str]:
29922992 """
29932993 return self .execute_command ("RPOPLPUSH" , src , dst )
29942994
2995- def rpush (self , name : str , * values : FieldT ) -> Union [Awaitable [int ], int ]:
2995+ def rpush (self , name : KeyT , * values : FieldT ) -> Union [Awaitable [int ], int ]:
29962996 """
29972997 Push ``values`` onto the tail of the list ``name``
29982998
29992999 For more information, see https://redis.io/commands/rpush
30003000 """
30013001 return self .execute_command ("RPUSH" , name , * values )
30023002
3003- def rpushx (self , name : str , * values : str ) -> Union [Awaitable [int ], int ]:
3003+ def rpushx (self , name : KeyT , * values : str ) -> Union [Awaitable [int ], int ]:
30043004 """
30053005 Push ``value`` onto the tail of the list ``name`` if ``name`` exists
30063006
@@ -3010,7 +3010,7 @@ def rpushx(self, name: str, *values: str) -> Union[Awaitable[int], int]:
30103010
30113011 def lpos (
30123012 self ,
3013- name : str ,
3013+ name : KeyT ,
30143014 value : str ,
30153015 rank : Optional [int ] = None ,
30163016 count : Optional [int ] = None ,
@@ -3055,7 +3055,7 @@ def lpos(
30553055
30563056 def sort (
30573057 self ,
3058- name : str ,
3058+ name : KeyT ,
30593059 start : Optional [int ] = None ,
30603060 num : Optional [int ] = None ,
30613061 by : Optional [str ] = None ,
0 commit comments