♻️ (chat.py): remove unnecessary type hint for graph variable to improve code readability and consistency

This commit is contained in:
Gabriel Luiz Freitas Almeida 2024-06-22 00:37:21 -03:00
commit 88a8294d90

View file

@ -158,11 +158,11 @@ async def build_vertex(
if not cache:
# If there's no cache
logger.warning(f"No cache found for {flow_id_str}. Building graph starting at {vertex_id}")
graph = await build_graph_from_db(
graph: "Graph" = await build_graph_from_db(
flow_id=flow_id_str, session=next(get_session()), chat_service=chat_service
)
else:
graph: "Graph" = cache.get("result")
graph = cache.get("result")
await graph.initialize_run()
vertex = graph.get_vertex(vertex_id)