Skip to content

Commit bdcecef

Browse files
committed
PYTHON-4925 Fix typing
1 parent 2c55e59 commit bdcecef

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

pymongo/asynchronous/bulk.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ def add_replace(
180180
) -> None:
181181
"""Create a replace document and add it to the list of ops."""
182182
validate_ok_for_replace(replacement)
183-
cmd = {"q": selector, "u": replacement}
183+
cmd: dict[str, Any] = {"q": selector, "u": replacement}
184184
if upsert is not None:
185185
cmd["upsert"] = upsert
186186
if collation is not None:
@@ -202,7 +202,7 @@ def add_delete(
202202
hint: Union[str, dict[str, Any], None] = None,
203203
) -> None:
204204
"""Create a delete document and add it to the list of ops."""
205-
cmd = {"q": selector, "limit": limit}
205+
cmd: dict[str, Any] = {"q": selector, "limit": limit}
206206
if collation is not None:
207207
self.uses_collation = True
208208
cmd["collation"] = collation

pymongo/synchronous/bulk.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ def add_replace(
180180
) -> None:
181181
"""Create a replace document and add it to the list of ops."""
182182
validate_ok_for_replace(replacement)
183-
cmd = {"q": selector, "u": replacement}
183+
cmd: dict[str, Any] = {"q": selector, "u": replacement}
184184
if upsert is not None:
185185
cmd["upsert"] = upsert
186186
if collation is not None:
@@ -202,7 +202,7 @@ def add_delete(
202202
hint: Union[str, dict[str, Any], None] = None,
203203
) -> None:
204204
"""Create a delete document and add it to the list of ops."""
205-
cmd = {"q": selector, "limit": limit}
205+
cmd: dict[str, Any] = {"q": selector, "limit": limit}
206206
if collation is not None:
207207
self.uses_collation = True
208208
cmd["collation"] = collation

0 commit comments

Comments
 (0)