feat: Bump ruff version to 0.9 (#5666)
* Bump ruff version to 0.9 * Rename some modules for A005 ruff rule
This commit is contained in:
parent
242165b8aa
commit
da83dbbcb5
29 changed files with 137 additions and 136 deletions
|
|
@ -48,7 +48,7 @@ from langflow.services.deps import get_chat_service, get_session, get_telemetry_
|
|||
from langflow.services.telemetry.schema import ComponentPayload, PlaygroundPayload
|
||||
|
||||
if TYPE_CHECKING:
|
||||
from langflow.graph.vertex.types import InterfaceVertex
|
||||
from langflow.graph.vertex.vertex_types import InterfaceVertex
|
||||
|
||||
router = APIRouter(tags=["Chat"])
|
||||
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ router = APIRouter(tags=["Base"])
|
|||
|
||||
@router.get("/all", dependencies=[Depends(get_current_active_user)])
|
||||
async def get_all():
|
||||
from langflow.interface.types import get_and_cache_all_types_dict
|
||||
from langflow.interface.components import get_and_cache_all_types_dict
|
||||
|
||||
try:
|
||||
return await get_and_cache_all_types_dict(settings_service=get_settings_service())
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
from .character import CharacterTextSplitterComponent
|
||||
from .conversation import ConversationChainComponent
|
||||
from .csv import CSVAgentComponent
|
||||
from .csv_agent import CSVAgentComponent
|
||||
from .fake_embeddings import FakeEmbeddingsComponent
|
||||
from .html_link_extractor import HtmlLinkExtractorComponent
|
||||
from .json import JsonAgentComponent
|
||||
from .json_agent import JsonAgentComponent
|
||||
from .json_document_builder import JSONDocumentBuilder
|
||||
from .langchain_hub import LangChainHubPromptComponent
|
||||
from .language_recursive import LanguageRecursiveTextSplitterComponent
|
||||
|
|
@ -26,7 +26,7 @@ from .tool_calling import ToolCallingAgentComponent
|
|||
from .vector_store import VectoStoreRetrieverComponent
|
||||
from .vector_store_info import VectorStoreInfoComponent
|
||||
from .vector_store_router import VectorStoreRouterAgentComponent
|
||||
from .xml import XMLAgentComponent
|
||||
from .xml_agent import XMLAgentComponent
|
||||
|
||||
__all__ = [
|
||||
"CSVAgentComponent",
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
from langflow.graph.edge.base import Edge
|
||||
from langflow.graph.graph.base import Graph
|
||||
from langflow.graph.vertex.base import Vertex
|
||||
from langflow.graph.vertex.types import CustomComponentVertex, InterfaceVertex, StateVertex
|
||||
from langflow.graph.vertex.vertex_types import CustomComponentVertex, InterfaceVertex, StateVertex
|
||||
|
||||
__all__ = ["CustomComponentVertex", "Edge", "Graph", "InterfaceVertex", "StateVertex", "Vertex"]
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ from langflow.graph.graph.utils import (
|
|||
from langflow.graph.schema import InterfaceComponentTypes, RunOutputs
|
||||
from langflow.graph.vertex.base import Vertex, VertexStates
|
||||
from langflow.graph.vertex.schema import NodeData, NodeTypeEnum
|
||||
from langflow.graph.vertex.types import ComponentVertex, InterfaceVertex, StateVertex
|
||||
from langflow.graph.vertex.vertex_types import ComponentVertex, InterfaceVertex, StateVertex
|
||||
from langflow.logging.logger import LogConfig, configure
|
||||
from langflow.schema.dotdict import dotdict
|
||||
from langflow.schema.schema import INPUT_FIELD_NAME, InputType
|
||||
|
|
|
|||
|
|
@ -11,9 +11,9 @@ class Finish:
|
|||
|
||||
|
||||
def _import_vertex_types():
|
||||
from langflow.graph.vertex import types
|
||||
from langflow.graph.vertex import vertex_types
|
||||
|
||||
return types
|
||||
return vertex_types
|
||||
|
||||
|
||||
class VertexTypesDict(LazyLoadDictBase):
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@ class AllTypesDict(LazyLoadDictBase):
|
|||
|
||||
@override
|
||||
def get_type_dict(self):
|
||||
from langflow.interface.types import get_all_types_dict
|
||||
from langflow.interface.components import get_all_types_dict
|
||||
|
||||
settings_service = get_settings_service()
|
||||
return get_all_types_dict(settings_service.settings.components_path)
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ from langflow.initial_setup.setup import (
|
|||
load_bundles_from_urls,
|
||||
load_flows_from_directory,
|
||||
)
|
||||
from langflow.interface.types import get_and_cache_all_types_dict
|
||||
from langflow.interface.components import get_and_cache_all_types_dict
|
||||
from langflow.interface.utils import setup_llm_caching
|
||||
from langflow.logging.logger import configure
|
||||
from langflow.middleware import ContentSizeLimitMiddleware
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ if hasattr(asyncio, "timeout"):
|
|||
async def timeout_context(timeout_seconds):
|
||||
with asyncio.timeout(timeout_seconds) as ctx:
|
||||
yield ctx
|
||||
|
||||
else:
|
||||
|
||||
@asynccontextmanager
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ async def test_initialize_super_user():
|
|||
@pytest.mark.benchmark
|
||||
async def test_get_and_cache_all_types_dict():
|
||||
"""Benchmark get_and_cache_all_types_dict function."""
|
||||
from langflow.interface.types import get_and_cache_all_types_dict
|
||||
from langflow.interface.components import get_and_cache_all_types_dict
|
||||
|
||||
settings_service = get_settings_service()
|
||||
result = await get_and_cache_all_types_dict(settings_service)
|
||||
|
|
@ -70,7 +70,7 @@ async def test_get_and_cache_all_types_dict():
|
|||
async def test_create_starter_projects():
|
||||
"""Benchmark creation of starter projects."""
|
||||
from langflow.initial_setup.setup import create_or_update_starter_projects
|
||||
from langflow.interface.types import get_and_cache_all_types_dict
|
||||
from langflow.interface.components import get_and_cache_all_types_dict
|
||||
from langflow.services.utils import initialize_services
|
||||
|
||||
await initialize_services(fix_migration=False)
|
||||
|
|
|
|||
|
|
@ -150,6 +150,6 @@ def test_component_inputs_toolkit():
|
|||
for input_name, expected in expected_inputs.items():
|
||||
assert input_name in properties, f"{input_name} is missing in properties."
|
||||
assert properties[input_name]["title"] == expected["title"], f"Title mismatch for {input_name}."
|
||||
assert (
|
||||
properties[input_name]["description"] == expected["description"]
|
||||
), f"Description mismatch for {input_name}."
|
||||
assert properties[input_name]["description"] == expected["description"], (
|
||||
f"Description mismatch for {input_name}."
|
||||
)
|
||||
|
|
|
|||
|
|
@ -78,9 +78,9 @@ async def test_httpx_metadata_behavior(api_request, include_metadata, expected_p
|
|||
assert metadata["response_headers"]["custom-header"] == "HeaderValue"
|
||||
|
||||
# Validate redirection history
|
||||
assert metadata["redirection_history"] == [
|
||||
{"url": redirected_url, "status_code": 303}
|
||||
], "Redirection history is incorrect"
|
||||
assert metadata["redirection_history"] == [{"url": redirected_url, "status_code": 303}], (
|
||||
"Redirection history is incorrect"
|
||||
)
|
||||
|
||||
# Validate result
|
||||
assert metadata["result"] == response_content, "Response content mismatch"
|
||||
|
|
@ -111,9 +111,9 @@ async def test_save_to_file_behavior(api_request, save_to_file, expected_propert
|
|||
|
||||
# Check returned metadata
|
||||
metadata = result.data
|
||||
assert (
|
||||
set(metadata.keys()) == expected_properties
|
||||
), f"Unexpected properties: {set(metadata.keys())}. Raw result: {result.data}"
|
||||
assert set(metadata.keys()) == expected_properties, (
|
||||
f"Unexpected properties: {set(metadata.keys())}. Raw result: {result.data}"
|
||||
)
|
||||
|
||||
if save_to_file:
|
||||
# Validate that file_path exists in metadata
|
||||
|
|
|
|||
|
|
@ -159,9 +159,9 @@ class TestDirectoryComponent(ComponentTestBaseWithoutClient):
|
|||
# Check column names
|
||||
expected_columns = ["text", "file_path"]
|
||||
actual_columns = list(data_frame.columns)
|
||||
assert set(expected_columns).issubset(
|
||||
set(actual_columns)
|
||||
), f"Missing required columns. Expected at least {expected_columns}, got {actual_columns}"
|
||||
assert set(expected_columns).issubset(set(actual_columns)), (
|
||||
f"Missing required columns. Expected at least {expected_columns}, got {actual_columns}"
|
||||
)
|
||||
|
||||
# Verify content matches input files
|
||||
texts = data_frame["text"].tolist()
|
||||
|
|
@ -260,9 +260,9 @@ class TestDirectoryComponent(ComponentTestBaseWithoutClient):
|
|||
results = directory_component.load_directory()
|
||||
|
||||
# Verify number of loaded files
|
||||
assert (
|
||||
len(results) == expected_count
|
||||
), f"Expected {expected_count} results for file types {file_types}, got {len(results)}"
|
||||
assert len(results) == expected_count, (
|
||||
f"Expected {expected_count} results for file types {file_types}, got {len(results)}"
|
||||
)
|
||||
# Optionally, check the file extension in each result
|
||||
for r in results:
|
||||
# e.g., verify that the extension is indeed in file_types
|
||||
|
|
@ -358,20 +358,20 @@ class TestDirectoryComponent(ComponentTestBaseWithoutClient):
|
|||
# Verify parallel_load_data was called with correct parameters
|
||||
mock_parallel_load.assert_called_once()
|
||||
call_args = mock_parallel_load.call_args[1]
|
||||
assert (
|
||||
call_args["max_concurrency"] == 2
|
||||
), f"Expected max_concurrency=2, got {call_args.get('max_concurrency')}"
|
||||
assert (
|
||||
call_args["silent_errors"] is False
|
||||
), f"Expected silent_errors=False, got {call_args.get('silent_errors')}"
|
||||
assert call_args["max_concurrency"] == 2, (
|
||||
f"Expected max_concurrency=2, got {call_args.get('max_concurrency')}"
|
||||
)
|
||||
assert call_args["silent_errors"] is False, (
|
||||
f"Expected silent_errors=False, got {call_args.get('silent_errors')}"
|
||||
)
|
||||
|
||||
# Verify results
|
||||
assert (
|
||||
len(results) == 2
|
||||
), f"Expected 2 results, got {len(results)}: {[r.data['file_path'] for r in results]}"
|
||||
assert all(
|
||||
isinstance(r, Data) for r in results
|
||||
), f"All results should be Data objects, got types: {[type(r) for r in results]}"
|
||||
assert len(results) == 2, (
|
||||
f"Expected 2 results, got {len(results)}: {[r.data['file_path'] for r in results]}"
|
||||
)
|
||||
assert all(isinstance(r, Data) for r in results), (
|
||||
f"All results should be Data objects, got types: {[type(r) for r in results]}"
|
||||
)
|
||||
|
||||
actual_texts = [r.text for r in results]
|
||||
expected_texts = ["content1", "content2"]
|
||||
|
|
|
|||
|
|
@ -121,7 +121,7 @@ class TestURLComponent(ComponentTestBaseWithoutClient):
|
|||
component.set_attributes({"urls": urls})
|
||||
|
||||
mock_web_load.return_value = [
|
||||
Mock(page_content=f"content{i+1}", metadata={"source": url}) for i, url in enumerate(urls)
|
||||
Mock(page_content=f"content{i + 1}", metadata={"source": url}) for i, url in enumerate(urls)
|
||||
]
|
||||
|
||||
# Test fetch_content
|
||||
|
|
@ -131,7 +131,7 @@ class TestURLComponent(ComponentTestBaseWithoutClient):
|
|||
for i, item in enumerate(content):
|
||||
url = urls[i]
|
||||
assert item.source == url, f"Expected '{url}', got '{item.source}'"
|
||||
assert item.text == f"content{i+1}"
|
||||
assert item.text == f"content{i + 1}"
|
||||
|
||||
@respx.mock
|
||||
async def test_url_request_success(self, mock_web_load):
|
||||
|
|
|
|||
|
|
@ -24,6 +24,6 @@ def test_huggingface_inputs():
|
|||
|
||||
# Check if all expected inputs are present
|
||||
for name, input_type in expected_inputs.items():
|
||||
assert any(
|
||||
isinstance(inp, input_type) and inp.name == name for inp in inputs
|
||||
), f"Missing or incorrect input: {name}"
|
||||
assert any(isinstance(inp, input_type) and inp.name == name for inp in inputs), (
|
||||
f"Missing or incorrect input: {name}"
|
||||
)
|
||||
|
|
|
|||
|
|
@ -54,9 +54,9 @@ class TestSplitTextComponent(ComponentTestBaseWithoutClient):
|
|||
assert len(results) == 3, f"Expected 3 chunks, got {len(results)}"
|
||||
assert "This is a test" in results[0].text, f"Expected 'This is a test', got '{results[0].text}'"
|
||||
assert "It has multiple lines" in results[1].text, f"Expected 'It has multiple lines', got '{results[1].text}'"
|
||||
assert (
|
||||
"Each line should be a chunk" in results[2].text
|
||||
), f"Expected 'Each line should be a chunk', got '{results[2].text}'"
|
||||
assert "Each line should be a chunk" in results[2].text, (
|
||||
f"Expected 'Each line should be a chunk', got '{results[2].text}'"
|
||||
)
|
||||
|
||||
def test_split_text_with_overlap(self):
|
||||
"""Test text splitting with overlap."""
|
||||
|
|
@ -123,12 +123,12 @@ class TestSplitTextComponent(ComponentTestBaseWithoutClient):
|
|||
results = component.split_text()
|
||||
assert len(results) == 2, f"Expected 2 chunks, got {len(results)}"
|
||||
for result in results:
|
||||
assert (
|
||||
result.data["source"] == test_metadata["source"]
|
||||
), f"Expected source '{test_metadata['source']}', got '{result.data.get('source')}'"
|
||||
assert (
|
||||
result.data["author"] == test_metadata["author"]
|
||||
), f"Expected author '{test_metadata['author']}', got '{result.data.get('author')}'"
|
||||
assert result.data["source"] == test_metadata["source"], (
|
||||
f"Expected source '{test_metadata['source']}', got '{result.data.get('source')}'"
|
||||
)
|
||||
assert result.data["author"] == test_metadata["author"], (
|
||||
f"Expected author '{test_metadata['author']}', got '{result.data.get('author')}'"
|
||||
)
|
||||
|
||||
def test_split_text_as_dataframe(self):
|
||||
"""Test converting split text results to DataFrame."""
|
||||
|
|
@ -150,15 +150,15 @@ class TestSplitTextComponent(ComponentTestBaseWithoutClient):
|
|||
assert isinstance(data_frame, DataFrame), "Expected DataFrame instance"
|
||||
assert len(data_frame) == 3, f"Expected DataFrame with 3 rows, got {len(data_frame)}"
|
||||
assert list(data_frame.columns) == ["text"], f"Expected columns ['text'], got {list(data_frame.columns)}"
|
||||
assert (
|
||||
"First chunk" in data_frame.iloc[0]["text"]
|
||||
), f"Expected 'First chunk', got '{data_frame.iloc[0]['text']}'"
|
||||
assert (
|
||||
"Second chunk" in data_frame.iloc[1]["text"]
|
||||
), f"Expected 'Second chunk', got '{data_frame.iloc[1]['text']}'"
|
||||
assert (
|
||||
"Third chunk" in data_frame.iloc[2]["text"]
|
||||
), f"Expected 'Third chunk', got '{data_frame.iloc[2]['text']}'"
|
||||
assert "First chunk" in data_frame.iloc[0]["text"], (
|
||||
f"Expected 'First chunk', got '{data_frame.iloc[0]['text']}'"
|
||||
)
|
||||
assert "Second chunk" in data_frame.iloc[1]["text"], (
|
||||
f"Expected 'Second chunk', got '{data_frame.iloc[1]['text']}'"
|
||||
)
|
||||
assert "Third chunk" in data_frame.iloc[2]["text"], (
|
||||
f"Expected 'Third chunk', got '{data_frame.iloc[2]['text']}'"
|
||||
)
|
||||
|
||||
def test_split_text_empty_input(self):
|
||||
"""Test handling of empty input text."""
|
||||
|
|
|
|||
|
|
@ -672,13 +672,13 @@ def test_get_sorted_vertices_with_complex_cycle(graph_with_loop):
|
|||
# When is_cyclic is True and start_vertex_id is provided:
|
||||
# 1. The first layer will contain vertices with no predecessors and vertices that are part of the cycle
|
||||
# 2. This is because the cycle vertices are treated as having no dependencies in the initial sort
|
||||
assert (
|
||||
"OpenAI Embeddings" in first_layer
|
||||
), "Vertex with no predecessors 'OpenAI Embeddings' should be in first layer"
|
||||
assert "OpenAI Embeddings" in first_layer, (
|
||||
"Vertex with no predecessors 'OpenAI Embeddings' should be in first layer"
|
||||
)
|
||||
assert "Playlist Extractor" in first_layer, "Input vertex 'Playlist Extractor' should be in first layer"
|
||||
assert (
|
||||
len(first_layer) == 2
|
||||
), f"First layer should contain exactly 4 vertices, got {len(first_layer)}: {first_layer}"
|
||||
assert len(first_layer) == 2, (
|
||||
f"First layer should contain exactly 4 vertices, got {len(first_layer)}: {first_layer}"
|
||||
)
|
||||
|
||||
# Verify that the remaining layers contain the rest of the vertices in the correct order
|
||||
# The graph structure shows:
|
||||
|
|
@ -747,14 +747,14 @@ def test_get_sorted_vertices_with_stop_at_chroma(graph_with_loop):
|
|||
# When is_cyclic is True and we have a stop component:
|
||||
# 1. The first layer will contain vertices with no predecessors and vertices that are part of the cycle
|
||||
# 2. This is because the cycle vertices are treated as having no dependencies in the initial sort
|
||||
assert (
|
||||
"OpenAI Embeddings" in first_layer
|
||||
), "Vertex with no predecessors 'OpenAI Embeddings' should be in first layer"
|
||||
assert "OpenAI Embeddings" in first_layer, (
|
||||
"Vertex with no predecessors 'OpenAI Embeddings' should be in first layer"
|
||||
)
|
||||
assert "Playlist Extractor" in first_layer, "Input vertex 'Playlist Extractor' should be in first layer"
|
||||
|
||||
assert (
|
||||
len(first_layer) == 2
|
||||
), f"First layer should contain exactly 4 vertices, got {len(first_layer)}: {first_layer}"
|
||||
assert len(first_layer) == 2, (
|
||||
f"First layer should contain exactly 4 vertices, got {len(first_layer)}: {first_layer}"
|
||||
)
|
||||
|
||||
# Verify that the remaining layers contain the rest of the vertices in the correct order
|
||||
# The graph structure shows:
|
||||
|
|
@ -848,5 +848,5 @@ def test_get_sorted_vertices_exact_sequence(graph_with_loop):
|
|||
assert sequence == expected_sequence, f"Sequence: {sequence}"
|
||||
# Verify the exact sequence
|
||||
assert len(sequence) == len(expected_sequence), (
|
||||
f"Expected sequence length {len(expected_sequence)}, " f"but got {len(sequence)}"
|
||||
f"Expected sequence length {len(expected_sequence)}, but got {len(sequence)}"
|
||||
)
|
||||
|
|
|
|||
|
|
@ -180,9 +180,9 @@ def test_process_flow_vector_store_grouped(vector_store_grouped_json_flow):
|
|||
|
||||
for idx, expected_keyword in enumerate(expected_keywords):
|
||||
for key, value in expected_keyword.items():
|
||||
assert (
|
||||
value in edges[idx][key].split("-")[0]
|
||||
), f"Edge {idx}, key {key} expected to contain {value} but got {edges[idx][key]}"
|
||||
assert value in edges[idx][key].split("-")[0], (
|
||||
f"Edge {idx}, key {key} expected to contain {value} but got {edges[idx][key]}"
|
||||
)
|
||||
|
||||
|
||||
def test_update_template(sample_template, sample_nodes):
|
||||
|
|
|
|||
|
|
@ -145,7 +145,7 @@ def test_vector_store_rag_dump_components_and_edges(ingestion_graph, rag_graph):
|
|||
for node_id, expected_type in expected_nodes.items():
|
||||
assert node_id in node_map, f"Missing node {node_id}"
|
||||
assert node_map[node_id]["type"] == expected_type, (
|
||||
f"Node {node_id} has incorrect type. " f"Expected {expected_type}, got {node_map[node_id]['type']}"
|
||||
f"Node {node_id} has incorrect type. Expected {expected_type}, got {node_map[node_id]['type']}"
|
||||
)
|
||||
|
||||
# Verify all nodes in graph are expected
|
||||
|
|
@ -226,9 +226,9 @@ def test_vector_store_rag_add(ingestion_graph: Graph, rag_graph: Graph):
|
|||
f"Vertices mismatch: {len(ingestion_graph_copy.vertices)} "
|
||||
f"!= {len(ingestion_graph.vertices)} + {len(rag_graph.vertices)}"
|
||||
)
|
||||
assert len(ingestion_graph_copy.edges) == len(ingestion_graph.edges) + len(
|
||||
rag_graph.edges
|
||||
), f"Edges mismatch: {len(ingestion_graph_copy.edges)} != {len(ingestion_graph.edges)} + {len(rag_graph.edges)}"
|
||||
assert len(ingestion_graph_copy.edges) == len(ingestion_graph.edges) + len(rag_graph.edges), (
|
||||
f"Edges mismatch: {len(ingestion_graph_copy.edges)} != {len(ingestion_graph.edges)} + {len(rag_graph.edges)}"
|
||||
)
|
||||
|
||||
combined_graph_dump = ingestion_graph_copy.dump(
|
||||
name="Combined Graph", description="Graph for data ingestion and RAG", endpoint_name="combined"
|
||||
|
|
|
|||
|
|
@ -417,9 +417,9 @@ async def test_successful_run_with_input_type_text(client, simple_api_test, crea
|
|||
assert len(text_input_outputs) == 1
|
||||
# Now we check if the input_value is correct
|
||||
# We get text key twice because the output is now a Message
|
||||
assert all(
|
||||
output.get("results").get("text").get("text") == "value1" for output in text_input_outputs
|
||||
), text_input_outputs
|
||||
assert all(output.get("results").get("text").get("text") == "value1" for output in text_input_outputs), (
|
||||
text_input_outputs
|
||||
)
|
||||
|
||||
|
||||
@pytest.mark.api_key_required
|
||||
|
|
@ -451,9 +451,9 @@ async def test_successful_run_with_input_type_chat(client: AsyncClient, simple_a
|
|||
chat_input_outputs = [output for output in outputs_dict.get("outputs") if "ChatInput" in output.get("component_id")]
|
||||
assert len(chat_input_outputs) == 1
|
||||
# Now we check if the input_value is correct
|
||||
assert all(
|
||||
output.get("results").get("message").get("text") == "value1" for output in chat_input_outputs
|
||||
), chat_input_outputs
|
||||
assert all(output.get("results").get("message").get("text") == "value1" for output in chat_input_outputs), (
|
||||
chat_input_outputs
|
||||
)
|
||||
|
||||
|
||||
@pytest.mark.benchmark
|
||||
|
|
@ -507,9 +507,9 @@ async def test_successful_run_with_input_type_any(client, simple_api_test, creat
|
|||
all_message_or_text_dicts = [
|
||||
result_dict.get("message", result_dict.get("text")) for result_dict in all_result_dicts
|
||||
]
|
||||
assert all(
|
||||
message_or_text_dict.get("text") == "value1" for message_or_text_dict in all_message_or_text_dicts
|
||||
), any_input_outputs
|
||||
assert all(message_or_text_dict.get("text") == "value1" for message_or_text_dict in all_message_or_text_dicts), (
|
||||
any_input_outputs
|
||||
)
|
||||
|
||||
|
||||
async def test_invalid_flow_id(client, created_api_key):
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ from langflow.initial_setup.setup import (
|
|||
load_starter_projects,
|
||||
update_projects_components_with_latest_component_versions,
|
||||
)
|
||||
from langflow.interface.types import aget_all_types_dict
|
||||
from langflow.interface.components import aget_all_types_dict
|
||||
from langflow.services.database.models import Flow
|
||||
from langflow.services.database.models.folder.model import Folder
|
||||
from langflow.services.deps import get_settings_service, session_scope
|
||||
|
|
@ -52,9 +52,9 @@ async def test_get_project_data():
|
|||
assert isinstance(updated_at_datetime, datetime), f"Project {project_name} has no updated_at_datetime"
|
||||
assert isinstance(project_data, dict), f"Project {project_name} has no data"
|
||||
assert isinstance(project_icon, str) or project_icon is None, f"Project {project_name} has no icon"
|
||||
assert (
|
||||
isinstance(project_icon_bg_color, str) or project_icon_bg_color is None
|
||||
), f"Project {project_name} has no icon_bg_color"
|
||||
assert isinstance(project_icon_bg_color, str) or project_icon_bg_color is None, (
|
||||
f"Project {project_name} has no icon_bg_color"
|
||||
)
|
||||
|
||||
|
||||
@pytest.mark.usefixtures("client")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue