ref: Add ALL ruff rules for tests (#4183)

Add ALL ruff rules for tests
This commit is contained in:
Christophe Bornet 2024-10-19 22:41:37 +02:00 • committed by GitHub
commit f96f2eaf8a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
67 changed files with 421 additions and 361 deletions

View file

@ -1,4 +1,5 @@
import pytest
from tests.integration.utils import run_single_component

View file

@ -6,6 +6,7 @@ from langchain_core.documents import Document
from langflow.components.embeddings import OpenAIEmbeddingsComponent
from langflow.components.vectorstores import AstraVectorStoreComponent
from langflow.schema.data import Data
from tests.api_keys import get_astradb_api_endpoint, get_astradb_application_token, get_openai_api_key
from tests.integration.components.mock_components import TextToData
from tests.integration.utils import ComponentInputHandle, run_single_component
@ -27,7 +28,7 @@ ALL_COLLECTIONS = [
@pytest.fixture
def astradb_client(request):
def astradb_client():
client = AstraDB(api_endpoint=get_astradb_api_endpoint(), token=get_astradb_application_token())
yield client
for collection in ALL_COLLECTIONS:

View file

@ -2,6 +2,7 @@ import pytest
from langflow.components.helpers.ParseJSONData import ParseJSONDataComponent
from langflow.components.inputs import ChatInput
from langflow.schema import Data
from tests.integration.components.mock_components import TextToData
from tests.integration.utils import ComponentInputHandle, run_single_component

View file

@ -2,6 +2,7 @@ import pytest
from langflow.components.inputs import ChatInput
from langflow.memory import get_messages
from langflow.schema.message import Message
from tests.integration.utils import run_single_component

View file

@ -1,6 +1,7 @@
import pytest
from langflow.components.inputs import TextInputComponent
from langflow.schema.message import Message
from tests.integration.utils import run_single_component

View file

@ -4,6 +4,7 @@ import pytest
from langflow.components.models.OpenAIModel import OpenAIModelComponent
from langflow.components.output_parsers.OutputParser import OutputParserComponent
from langflow.components.prompts.Prompt import PromptComponent
from tests.integration.utils import ComponentInputHandle, run_single_component

View file

@ -2,6 +2,7 @@ import pytest
from langflow.components.outputs import ChatOutput
from langflow.memory import get_messages
from langflow.schema.message import Message
from tests.integration.utils import run_single_component

View file

@ -1,6 +1,7 @@
import pytest
from langflow.components.outputs import TextOutputComponent
from langflow.schema.message import Message
from tests.integration.utils import run_single_component

View file

@ -1,6 +1,7 @@
import pytest
from langflow.components.prompts import PromptComponent
from langflow.schema.message import Message
from tests.integration.utils import run_single_component