This is an automated email from the ASF dual-hosted git repository.
jedcunningham pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new 0d338e6051 Change docs type in insert_many to list of dicts (#37230)
0d338e6051 is described below
commit 0d338e6051f54c9940d34dceef9197224583e37c
Author: MezentsevIlya <[email protected]>
AuthorDate: Thu Feb 8 21:27:54 2024 +0500
Change docs type in insert_many to list of dicts (#37230)
---
airflow/providers/mongo/hooks/mongo.py | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/airflow/providers/mongo/hooks/mongo.py
b/airflow/providers/mongo/hooks/mongo.py
index 66bc54d010..e776f0e3ef 100644
--- a/airflow/providers/mongo/hooks/mongo.py
+++ b/airflow/providers/mongo/hooks/mongo.py
@@ -19,7 +19,7 @@
from __future__ import annotations
import warnings
-from typing import TYPE_CHECKING, Any, overload
+from typing import TYPE_CHECKING, Any, Iterable, overload
from urllib.parse import quote_plus, urlunsplit
import pymongo
@@ -247,7 +247,7 @@ class MongoHook(BaseHook):
return collection.insert_one(doc, **kwargs)
def insert_many(
- self, mongo_collection: str, docs: dict, mongo_db: str | None = None,
**kwargs
+ self, mongo_collection: str, docs: Iterable[dict], mongo_db: str |
None = None, **kwargs
) -> pymongo.results.InsertManyResult:
"""
Inserts many docs into a mongo collection.