diff --git a/integrations/cohere/src/cohere_haystack/embedders/document_embedder.py b/integrations/cohere/src/cohere_haystack/embedders/document_embedder.py index a8401c359..e14474fd9 100644 --- a/integrations/cohere/src/cohere_haystack/embedders/document_embedder.py +++ b/integrations/cohere/src/cohere_haystack/embedders/document_embedder.py @@ -5,7 +5,7 @@ import os from typing import Any, Dict, List, Optional -from cohere import AsyncClient, Client, COHERE_API_URL +from cohere import COHERE_API_URL, AsyncClient, Client from haystack import Document, component, default_to_dict from cohere_haystack.embedders.utils import get_async_response, get_response diff --git a/integrations/cohere/src/cohere_haystack/embedders/text_embedder.py b/integrations/cohere/src/cohere_haystack/embedders/text_embedder.py index 85d1936a4..936926b99 100644 --- a/integrations/cohere/src/cohere_haystack/embedders/text_embedder.py +++ b/integrations/cohere/src/cohere_haystack/embedders/text_embedder.py @@ -5,7 +5,7 @@ import os from typing import Any, Dict, List, Optional -from cohere import AsyncClient, Client, COHERE_API_URL +from cohere import COHERE_API_URL, AsyncClient, Client from haystack import component, default_to_dict from cohere_haystack.embedders.utils import get_async_response, get_response diff --git a/integrations/cohere/src/cohere_haystack/generator.py b/integrations/cohere/src/cohere_haystack/generator.py index 584218b0c..a07225804 100644 --- a/integrations/cohere/src/cohere_haystack/generator.py +++ b/integrations/cohere/src/cohere_haystack/generator.py @@ -6,11 +6,9 @@ import sys from typing import Any, Callable, Dict, List, Optional, cast -from haystack import DeserializationError, component, default_from_dict, default_to_dict -from haystack.lazy_imports import LazyImport - from cohere import COHERE_API_URL, Client from cohere.responses import Generations +from haystack import DeserializationError, component, default_from_dict, default_to_dict logger = logging.getLogger(__name__) diff --git a/integrations/cohere/tests/test_cohere_generators.py b/integrations/cohere/tests/test_cohere_generators.py index 0874c22b1..9462f364d 100644 --- a/integrations/cohere/tests/test_cohere_generators.py +++ b/integrations/cohere/tests/test_cohere_generators.py @@ -8,7 +8,6 @@ from cohere_haystack.generator import CohereGenerator - pytestmark = pytest.mark.generators diff --git a/integrations/cohere/tests/test_document_embedder.py b/integrations/cohere/tests/test_document_embedder.py index 4270aa0ef..5fab29e5b 100644 --- a/integrations/cohere/tests/test_document_embedder.py +++ b/integrations/cohere/tests/test_document_embedder.py @@ -2,16 +2,13 @@ # # SPDX-License-Identifier: Apache-2.0 import os -from unittest.mock import MagicMock -import numpy as np import pytest -from haystack import Document from cohere import COHERE_API_URL +from haystack import Document from cohere_haystack.embedders.document_embedder import CohereDocumentEmbedder - pytestmark = pytest.mark.embedders diff --git a/integrations/cohere/tests/test_text_embedder.py b/integrations/cohere/tests/test_text_embedder.py index 8eabbad5a..d2aed79c1 100644 --- a/integrations/cohere/tests/test_text_embedder.py +++ b/integrations/cohere/tests/test_text_embedder.py @@ -2,14 +2,12 @@ # # SPDX-License-Identifier: Apache-2.0 import os -from unittest.mock import MagicMock import pytest from cohere import COHERE_API_URL from cohere_haystack.embedders.text_embedder import CohereTextEmbedder - pytestmark = pytest.mark.embedders