diff --git a/airflow/providers/mongo/hooks/mongo.py b/airflow/providers/mongo/hooks/mongo.py index 66bc54d010ec0..e776f0e3eff17 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 @@ def insert_one( 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.