Skip to content

Commit 586bead

Browse files
committed
PYTHON-5782 Fix mypy error in test_message.py
1 parent 03fb33e commit 586bead

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

test/test_message.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818

1919
import struct
2020
import sys
21+
from typing import Any
2122
from unittest.mock import MagicMock
2223

2324
sys.path[0:0] = [""]
@@ -154,7 +155,7 @@ def test_op_msg_max_doc_size_zero_without_docs(self):
154155
self.assertEqual(max_doc_size, 0)
155156

156157
def test_op_msg_max_doc_size_matches_largest_encoded_doc(self):
157-
docs = [{"_id": 1}, {"_id": 2, "data": "a" * 100}]
158+
docs: list[dict[str, Any]] = [{"_id": 1}, {"_id": 2, "data": "a" * 100}]
158159
cmd: dict = {"insert": "col", "documents": docs}
159160
max_doc_size = _op_msg(0, cmd, "testdb", None, _OPTS)[3]
160161
self.assertEqual(max_doc_size, max(len(encode(d)) for d in docs))

0 commit comments

Comments
 (0)