From 3520635f8438473b9776d831d13b1d7262a41138 Mon Sep 17 00:00:00 2001 From: anakin87 Date: Wed, 6 Mar 2024 11:09:38 +0100 Subject: [PATCH] ignore missing imports in pyproject --- integrations/mongodb_atlas/pyproject.toml | 3 +-- .../document_stores/mongodb_atlas/document_store.py | 6 +++--- integrations/mongodb_atlas/tests/test_document_store.py | 4 ++-- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/integrations/mongodb_atlas/pyproject.toml b/integrations/mongodb_atlas/pyproject.toml index 0021884ad..b3eba42e2 100644 --- a/integrations/mongodb_atlas/pyproject.toml +++ b/integrations/mongodb_atlas/pyproject.toml @@ -175,8 +175,7 @@ exclude_lines = [ module = [ "haystack.*", "haystack_integrations.*", - "mongodb_atlas.*", - "psycopg.*", + "pymongo.*", "pytest.*" ] ignore_missing_imports = true diff --git a/integrations/mongodb_atlas/src/haystack_integrations/document_stores/mongodb_atlas/document_store.py b/integrations/mongodb_atlas/src/haystack_integrations/document_stores/mongodb_atlas/document_store.py index 976bbc8c4..c9e8f1dae 100644 --- a/integrations/mongodb_atlas/src/haystack_integrations/document_stores/mongodb_atlas/document_store.py +++ b/integrations/mongodb_atlas/src/haystack_integrations/document_stores/mongodb_atlas/document_store.py @@ -11,9 +11,9 @@ from haystack.document_stores.types import DuplicatePolicy from haystack.utils import Secret, deserialize_secrets_inplace from haystack_integrations.document_stores.mongodb_atlas.filters import _normalize_filters -from pymongo import InsertOne, MongoClient, ReplaceOne, UpdateOne # type: ignore -from pymongo.driver_info import DriverInfo # type: ignore -from pymongo.errors import BulkWriteError # type: ignore +from pymongo import InsertOne, MongoClient, ReplaceOne, UpdateOne +from pymongo.driver_info import DriverInfo +from pymongo.errors import BulkWriteError logger = logging.getLogger(__name__) diff --git a/integrations/mongodb_atlas/tests/test_document_store.py b/integrations/mongodb_atlas/tests/test_document_store.py index dcbd3cf84..89810ec8b 100644 --- a/integrations/mongodb_atlas/tests/test_document_store.py +++ b/integrations/mongodb_atlas/tests/test_document_store.py @@ -12,8 +12,8 @@ from haystack.utils import Secret from haystack_integrations.document_stores.mongodb_atlas import MongoDBAtlasDocumentStore from pandas import DataFrame -from pymongo import MongoClient # type: ignore -from pymongo.driver_info import DriverInfo # type: ignore +from pymongo import MongoClient +from pymongo.driver_info import DriverInfo @pytest.mark.skipif(