Closed
Description
This code here:
from typing import reveal_type
from redis import Redis
redis = Redis(host="localhost", port=6379, db=0)
redis.set("test", "Hello, World!")
reveal_type(redis.get("test"))
Shows:
Revealed type is "Union[typing.Awaitable[Any], Any]"
Which I think is wrong, since the return type should be Any
instead[1], right?
I think we might separate ResponseT
for Redis and async Redis, what do you think?
I haven't sent a PR for this, because it will touch quite a few files, so I wanted to double check with you all first 😊
[1] We should allow using generics for return types, but that's another issue 😊
Metadata
Metadata
Assignees
Labels
No labels