From 7a2398df18da90d9e780814b072ff9f92e7d162a Mon Sep 17 00:00:00 2001 From: Julien Danjou Date: Mon, 12 Oct 2020 13:47:32 +0200 Subject: [PATCH] fix(redis): add missing __enter__ and __exit__ methods on Redis (#4655) --- third_party/2and3/redis/client.pyi | 2 ++ 1 file changed, 2 insertions(+) diff --git a/third_party/2and3/redis/client.pyi b/third_party/2and3/redis/client.pyi index 6c24380da..503decea1 100644 --- a/third_party/2and3/redis/client.pyi +++ b/third_party/2and3/redis/client.pyi @@ -340,6 +340,8 @@ class Redis(object): def pubsub_numpat(self) -> int: ... def monitor(self) -> Monitor: ... def cluster(self, cluster_arg: str, *args: Any) -> Any: ... + def __enter__(self) -> Redis: ... + def __exit__(self, exc_type, exc_value, traceback): ... StrictRedis = Redis