Skip to content

Commit 102d825

Browse files
committed
Revert "typing with string literals"
This reverts commit d6a4326.
1 parent 2c50d02 commit 102d825

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

redis/client.py

+7-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
import time
55
import warnings
66
from itertools import chain
7-
from typing import Any, Callable, Dict, List, Optional, Type, Union, Mapping
7+
from typing import Any, Callable, Dict, List, Optional, Type, Union, Mapping, TYPE_CHECKING
88

99
from redis._cache import (
1010
DEFAULT_ALLOW_LIST,
@@ -51,6 +51,10 @@
5151
str_if_bytes,
5252
)
5353

54+
if TYPE_CHECKING:
55+
import OpenSSL
56+
import ssl
57+
5458
SYM_EMPTY = b""
5559
EMPTY_RESPONSE = "EMPTY_RESPONSE"
5660

@@ -201,9 +205,9 @@ def __init__(
201205
ssl_password: Optional[str] = None,
202206
ssl_validate_ocsp: bool = False,
203207
ssl_validate_ocsp_stapled: bool = False,
204-
ssl_ocsp_context: Optional["OpenSSL.SSL.Context"] = None,
208+
ssl_ocsp_context: Optional[OpenSSL.SSL.Context] = None,
205209
ssl_ocsp_expected_cert: Optional[str] = None,
206-
ssl_min_version: Optional["ssl.TLSVersion"] = None,
210+
ssl_min_version: Optional[ssl.TLSVersion] = None,
207211
ssl_ciphers: Optional[str] = None,
208212
max_connections: Optional[int] = None,
209213
single_connection_client: bool = False,

0 commit comments

Comments
 (0)