You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I noticed the return value type hint of redis-py functions are always like: Union[Awaitable[int], int]: (e.g. redis.commands.core.py:L4824)
def hlen(self, name: str) -> Union[Awaitable[int], int]:
"""
Return the number of elements in hash ``name``
For more information see https://redis.io/commands/hlen
"""
return self.execute_command("HLEN", name)
Operator "<=" not supported for types "Awaitable[int] | int" and "Literal[10]"
Operator "<=" not supported for types "Awaitable[int]" and "Literal[10]"
How to let Pylance know I am not calling the function in asynchronous way, so I can mitigate this type checking error?
evgenymarkov, iamkroot, gazorby, JamesTann, abbasyadollahi and 26 morerob4226 and tsukumijima