Skip to content

Commit c20623f

Browse files
committed
fix typing
1 parent 981a046 commit c20623f

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

pymongo/encryption_options.py

+4-3
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020

2121
from typing import TYPE_CHECKING, Any, Mapping, Optional
2222

23+
from pymongo.pyopenssl_context import SSLContext
2324
from pymongo.uri_parser_shared import _parse_kms_tls_options
2425

2526
try:
@@ -238,12 +239,12 @@ def __init__(
238239
self._mongocryptd_spawn_args.append("--idleShutdownTimeoutSecs=60")
239240
# Maps KMS provider name to a SSLContext.
240241
self._kms_tls_options = kms_tls_options
241-
self._sync_kms_ssl_contexts = None
242-
self._async_kms_ssl_contexts = None
242+
self._sync_kms_ssl_contexts: dict[str, SSLContext] = None # type:ignore[assignment]
243+
self._async_kms_ssl_contexts: dict[str, SSLContext] = None # type:ignore[assignment]
243244
self._bypass_query_analysis = bypass_query_analysis
244245
self._key_expiration_ms = key_expiration_ms
245246

246-
def _kms_ssl_contexts(self, is_sync: bool):
247+
def _kms_ssl_contexts(self, is_sync: bool) -> dict[str, SSLContext]:
247248
if is_sync:
248249
if self._sync_kms_ssl_contexts is None:
249250
self._sync_kms_ssl_contexts = _parse_kms_tls_options(self._kms_tls_options, True)

0 commit comments

Comments
 (0)