Skip to content

Commit

Permalink
fix: NameError for Vertex and Graph Imports in Flow Tool (#4054)
Browse files Browse the repository at this point in the history
* Update flow_tool.py

- Removed unnecessary imports from TYPE_CHECKING block.
- Cleaned up import statements for better readability and organization.

* Update flow_tool.py
  • Loading branch information
edwinjosechittilappilly authored Oct 7, 2024
1 parent b0bda28 commit 4ed00cd
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/backend/base/langflow/base/tools/flow_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,15 @@
from loguru import logger

from langflow.base.flow_processing.utils import build_data_from_result_data, format_flow_output_data
from langflow.graph.graph.base import Graph # cannot be a part of TYPE_CHECKING # noqa: TCH001
from langflow.graph.vertex.base import Vertex # cannot be a part of TYPE_CHECKING # noqa: TCH001
from langflow.helpers.flow import build_schema_from_inputs, get_arg_names, get_flow_inputs, run_flow
from langflow.utils.async_helpers import run_until_complete

if TYPE_CHECKING:
from langchain_core.runnables import RunnableConfig
from pydantic.v1 import BaseModel

from langflow.graph.graph.base import Graph
from langflow.graph.vertex.base import Vertex


class FlowTool(BaseTool):
name: str
Expand Down

0 comments on commit 4ed00cd

Please sign in to comment.