Skip to content

Commit 10e99da

Browse files
committed
mypy fixes
1 parent 76f6c25 commit 10e99da

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/unified_format.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@
130130
from pymongo.server_selectors import Selection, writable_server_selector
131131
from pymongo.server_type import SERVER_TYPE
132132
from pymongo.topology_description import TopologyDescription
133-
from pymongo.typings import ClusterTime, _Address
133+
from pymongo.typings import _Address
134134
from pymongo.write_concern import WriteConcern
135135

136136
JSON_OPTS = json_util.JSONOptions(tz_aware=False)
@@ -432,7 +432,7 @@ def __init__(self, test_class):
432432
self._listeners: Dict[str, EventListenerUtil] = {}
433433
self._session_lsids: Dict[str, Mapping[str, Any]] = {}
434434
self.test: UnifiedSpecTestMixinV1 = test_class
435-
self._cluster_time: Optional[ClusterTime] = None
435+
self._cluster_time: Mapping[str, Any] = {}
436436

437437
def __contains__(self, item):
438438
return item in self._entities
@@ -625,9 +625,9 @@ def get_lsid_for_session(self, session_name):
625625
# session has been closed.
626626
return self._session_lsids[session_name]
627627

628-
def advance_cluster_times(self):
628+
def advance_cluster_times(self) -> None:
629629
"""Manually synchronize entities when desired"""
630-
if self._cluster_time is None:
630+
if not self._cluster_time:
631631
self._cluster_time = self.test.client.admin.command("ping").get("$clusterTime")
632632
for entity in self._entities:
633633
if isinstance(entity, ClientSession):

0 commit comments

Comments
 (0)