Repository: redis/redis-py

Issue:
Bad *list typing
**Version**: 4.3.1 (current)

**Platform**: any

**Description**: 
Marking `*values` as a `List` is wrong action, cause in this case type hint should show every element type (cause it's already unfold).

Result - wrong warnings:
<img width="552" alt="Screenshot 2022-05-28 at 11 00 49" src="https://user-images.githubusercontent.com/25399456/170816500-b690665f-cba5-4a3f-98c6-71beddb0bd21.png">


So I've found all similar cases:
<img width="475" alt="Screenshot 2022-05-28 at 02 04 35" src="https://user-images.githubusercontent.com/25399456/170798866-8091bdc0-ef6b-41f5-87ba-6456b1e7fbce.png">





Discussion:

Resolving patch:
diff --git a/redis/commands/core.py b/redis/commands/core.py
--- a/redis/commands/core.py
+++ b/redis/commands/core.py
@@ -2593,7 +2593,7 @@ def lpop(self, name: str, count: Optional[int] = None) -> Union[str, List, None]
         else:
             return self.execute_command("LPOP", name)
 
-    def lpush(self, name: str, *values: List) -> Union[Awaitable[int], int]:
+    def lpush(self, name: str, *values: FieldT) -> Union[Awaitable[int], int]:
         """
         Push ``values`` onto the head of the list ``name``
 
@@ -2601,7 +2601,7 @@ def lpush(self, name: str, *values: List) -> Union[Awaitable[int], int]:
         """
         return self.execute_command("LPUSH", name, *values)
 
-    def lpushx(self, name: str, *values: List) -> Union[Awaitable[int], int]:
+    def lpushx(self, name: str, *values: FieldT) -> Union[Awaitable[int], int]:
         """
         Push ``value`` onto the head of the list ``name`` if ``name`` exists
 
@@ -2679,7 +2679,7 @@ def rpoplpush(self, src: str, dst: str) -> Union[Awaitable[str], str]:
         """
         return self.execute_command("RPOPLPUSH", src, dst)
 
-    def rpush(self, name: str, *values: List) -> Union[Awaitable[int], int]:
+    def rpush(self, name: str, *values: FieldT) -> Union[Awaitable[int], int]:
         """
         Push ``values`` onto the tail of the list ``name``
 
@@ -3169,7 +3169,7 @@ class SetCommands(CommandsProtocol):
     see: https://redis.io/topics/data-types#sets
     """
 
-    def sadd(self, name: str, *values: List) -> Union[Awaitable[int], int]:
+    def sadd(self, name: str, *values: FieldT) -> Union[Awaitable[int], int]:
         """
         Add ``value(s)`` to set ``name``
 
@@ -3307,7 +3307,7 @@ def srandmember(
         args = (number is not None) and [number] or []
         return self.execute_command("SRANDMEMBER", name, *args)
 
-    def srem(self, name: str, *values: List) -> Union[Awaitable[int], int]:
+    def srem(self, name: str, *values: FieldT) -> Union[Awaitable[int], int]:
         """
         Remove ``values`` from set ``name``
 
@@ -4586,7 +4586,7 @@ def zrank(self, name: KeyT, value: EncodableT) -> ResponseT:
         """
         return self.execute_command("ZRANK", name, value)
 
-    def zrem(self, name: KeyT, *values: EncodableT) -> ResponseT:
+    def zrem(self, name: KeyT, *values: FieldT) -> ResponseT:
         """
         Remove member ``values`` from sorted set ``name``
 
@@ -4735,7 +4735,7 @@ class HyperlogCommands(CommandsProtocol):
     see: https://redis.io/topics/data-types-intro#hyperloglogs
     """
 
-    def pfadd(self, name: KeyT, *values: EncodableT) -> ResponseT:
+    def pfadd(self, name: KeyT, *values: FieldT) -> ResponseT:
         """
         Adds the specified elements to the specified HyperLogLog.
 


Test patch: