Skip to content

Commit

Permalink
[autofix.ci] apply automated fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
autofix-ci[bot] authored Dec 24, 2024
1 parent 7525811 commit fc8035e
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/backend/base/langflow/components/tools/yahoo_finance.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,14 @@
from enum import Enum

import yfinance as yf
from langchain.tools import StructuredTool
from langchain_core.tools import ToolException
from loguru import logger
from pydantic import BaseModel, Field

from langflow.custom import Component
from langflow.field_typing import Tool
from langflow.inputs import DropdownInput, IntInput, MessageTextInput
from langflow.schema import Data
from langflow.io import Output
from langflow.schema import Data
from langflow.schema.message import Message


Expand Down Expand Up @@ -122,7 +120,10 @@ def _yahoo_finance_tool(
result = pprint.pformat(result)

if method == YahooFinanceMethod.GET_NEWS:
data_list = [Data(text=f"{article['title']}: {article['link']}", data=article) for article in ast.literal_eval(result)]
data_list = [
Data(text=f"{article['title']}: {article['link']}", data=article)
for article in ast.literal_eval(result)
]
else:
data_list = [Data(text=result, data={"result": result})]

Expand Down

0 comments on commit fc8035e

Please sign in to comment.