Skip to content

Commit dd22102

Browse files
committed
typing with string literals
1 parent 151c526 commit dd22102

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

redis/client.py

Lines changed: 3 additions & 7 deletions
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, TYPE_CHECKING
7+
from typing import Any, Callable, Dict, List, Optional, Type, Union, Mapping
88

99
from redis._parsers.encoders import Encoder
1010
from redis._parsers.helpers import (
@@ -53,10 +53,6 @@
5353
str_if_bytes,
5454
)
5555

56-
if TYPE_CHECKING:
57-
import OpenSSL
58-
import ssl
59-
6056
SYM_EMPTY = b""
6157
EMPTY_RESPONSE = "EMPTY_RESPONSE"
6258

@@ -207,9 +203,9 @@ def __init__(
207203
ssl_password: Optional[str] = None,
208204
ssl_validate_ocsp: bool = False,
209205
ssl_validate_ocsp_stapled: bool = False,
210-
ssl_ocsp_context: Optional[OpenSSL.SSL.Context] = None,
206+
ssl_ocsp_context: Optional["OpenSSL.SSL.Context"] = None,
211207
ssl_ocsp_expected_cert: Optional[str] = None,
212-
ssl_min_version: Optional[ssl.TLSVersion] = None,
208+
ssl_min_version: Optional["ssl.TLSVersion"] = None,
213209
ssl_ciphers: Optional[str] = None,
214210
max_connections: Optional[int] = None,
215211
single_connection_client: bool = False,

0 commit comments

Comments
 (0)