-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
redis-py async pipelines not being awaited is an error #8324
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
This is basically the same issue we have with the non-async |
Hi @srittau, I'd be happy to submit a PR, but I think a solution must be agreed upon beforehand. AFAICT every command in
|
Just to clarify (I didn't check): |
AFAICT (judging by the source code), pipeline = redis.pipeline()
pipeline.get(...) # will return pipeline
pipeline.set(...) # will return pipeline
pipeline.watch(...) # will return a coroutine
pipeline.get(...) # will return a coroutine
pipeline.set(...) # will return a coroutine
pipeline.multi() # returns none
pipeline.get(...) # will return pipeline
pipeline.set(...) # will return pipeline I'll get started on an |
types-redis incorrectly marks async
Pipeline
commands as coroutines, when in truth they do not need to be awaited to work (and are not implemented as coroutines.the following snippet
is functional according to redis-py, but fails
mypy
with the errorerror: Value of type "Coroutine[Any, Any, bool]" must be used
The text was updated successfully, but these errors were encountered: