Skip to content

Commit 80cd8fb

Browse files
committed
typing
1 parent 0696cf8 commit 80cd8fb

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

pymongo/asynchronous/server.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,8 +227,8 @@ async def run_operation(
227227
await operation.client._process_response(first, operation.session) # type: ignore[misc, arg-type]
228228
# Append timeout details to MaxTimeMSExpired responses.
229229
if first.get("code") == 50:
230-
timeout_details = _get_timeout_details(conn.opts)
231-
first["errmsg"] += format_timeout_details(timeout_details)
230+
timeout_details = _get_timeout_details(conn.opts) # type:ignore[has-type]
231+
first["errmsg"] += format_timeout_details(timeout_details) # type:ignore[index]
232232
_check_command_response(first, conn.max_wire_version)
233233
except Exception as exc:
234234
duration = datetime.now() - start

pymongo/synchronous/server.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,8 +227,8 @@ def run_operation(
227227
operation.client._process_response(first, operation.session) # type: ignore[misc, arg-type]
228228
# Append timeout details to MaxTimeMSExpired responses.
229229
if first.get("code") == 50:
230-
timeout_details = _get_timeout_details(conn.opts)
231-
first["errmsg"] += format_timeout_details(timeout_details)
230+
timeout_details = _get_timeout_details(conn.opts) # type:ignore[has-type]
231+
first["errmsg"] += format_timeout_details(timeout_details) # type:ignore[index]
232232
_check_command_response(first, conn.max_wire_version)
233233
except Exception as exc:
234234
duration = datetime.now() - start

0 commit comments

Comments
 (0)