redis-py
redis-py copied to clipboard
Type hints for chained pipelines
I'm using redis-py version 5.2.1.
The documentation shows that calls to a pipeline can be chained. Here's an example from the documentation:
pipe = r.pipeline()
pipe.set("a", "a value").set("b", "b value").get("a").execute()
The type hints appear to be set incorrectly on the methods to return the pipeline object.
It seems that since Pipeline inherits from Redis whichin turn inherts from RedisModuleCommands, CoreCommands, and SentinelCommands, the types for chained Pipeline commands aren't working because the inherited commands return their "normal" responses as typed.
The same thing is happening in the asyncio module.
Hi @leverage-analytics, thank you for pointing this out! We'll have a look at this.