From ba7be3c1bb71cd13c483ac7c5fa6e12faa0a276d Mon Sep 17 00:00:00 2001 From: Iris <58442094+sleepyStick@users.noreply.github.com> Date: Wed, 28 Jun 2023 09:24:17 -0700 Subject: [PATCH] PYTHON-3781 fix type for server_selector (#1269) --- pymongo/client_options.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pymongo/client_options.py b/pymongo/client_options.py index 7e5be6928..91ef51a52 100644 --- a/pymongo/client_options.py +++ b/pymongo/client_options.py @@ -15,7 +15,7 @@ """Tools to parse mongo client options.""" from __future__ import annotations -from typing import TYPE_CHECKING, Any, Callable, Mapping, Optional, Tuple +from typing import TYPE_CHECKING, Any, Mapping, Optional, Tuple from bson.codec_options import _parse_codec_options from pymongo import common @@ -39,7 +39,7 @@ if TYPE_CHECKING: from bson.codec_options import CodecOptions from pymongo.encryption import AutoEncryptionOpts from pymongo.pyopenssl_context import SSLContext - from pymongo.server_selectors import Selection + from pymongo.topology_description import _ServerSelector def _parse_credentials( @@ -247,7 +247,7 @@ class ClientOptions: return self.__server_selection_timeout @property - def server_selector(self) -> Callable[[Selection], Selection]: + def server_selector(self) -> _ServerSelector: return self.__server_selector @property