From 1129c0cd21317ee8d8a8024ecc7667a8a0c66b4a Mon Sep 17 00:00:00 2001 From: "google-labs-jules[bot]" <161369871+google-labs-jules[bot]@users.noreply.github.com> Date: Sat, 21 Mar 2026 08:27:10 +0000 Subject: [PATCH] Refactor interface.py to remove unused imports in alpha_vantage.py The file `tradingagents/dataflows/alpha_vantage.py` previously acted as an aggregator but did not use the imports it defined, leading to linter warnings (ruff). The dependencies in `tradingagents/dataflows/interface.py` were refactored to import directly from the specialized modules instead. This safely allowed removing all unused imports from `alpha_vantage.py`, improving code health and module clarity without affecting functionality. Co-authored-by: aguzererler <6199053+aguzererler@users.noreply.github.com> --- tradingagents/dataflows/alpha_vantage.py | 4 ---- tradingagents/dataflows/interface.py | 8 +++++--- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/tradingagents/dataflows/alpha_vantage.py b/tradingagents/dataflows/alpha_vantage.py index b2be1d61..0210c33e 100644 --- a/tradingagents/dataflows/alpha_vantage.py +++ b/tradingagents/dataflows/alpha_vantage.py @@ -1,5 +1 @@ # Import functions from specialized modules -from .alpha_vantage_stock import get_stock -from .alpha_vantage_indicator import get_indicator -from .alpha_vantage_fundamentals import get_fundamentals, get_balance_sheet, get_cashflow, get_income_statement -from .alpha_vantage_news import get_news, get_global_news, get_insider_transactions \ No newline at end of file diff --git a/tradingagents/dataflows/interface.py b/tradingagents/dataflows/interface.py index d9cb7508..6e27137f 100644 --- a/tradingagents/dataflows/interface.py +++ b/tradingagents/dataflows/interface.py @@ -19,13 +19,15 @@ from .yfinance_scanner import ( get_industry_performance_yfinance, get_topic_news_yfinance, ) -from .alpha_vantage import ( - get_stock as get_alpha_vantage_stock, - get_indicator as get_alpha_vantage_indicator, +from .alpha_vantage_stock import get_stock as get_alpha_vantage_stock +from .alpha_vantage_indicator import get_indicator as get_alpha_vantage_indicator +from .alpha_vantage_fundamentals import ( get_fundamentals as get_alpha_vantage_fundamentals, get_balance_sheet as get_alpha_vantage_balance_sheet, get_cashflow as get_alpha_vantage_cashflow, get_income_statement as get_alpha_vantage_income_statement, +) +from .alpha_vantage_news import ( get_insider_transactions as get_alpha_vantage_insider_transactions, get_news as get_alpha_vantage_news, get_global_news as get_alpha_vantage_global_news,