Commit Graph

4 Commits

Author SHA1 Message Date
Joseph O'Brien 85992fc05b chore: remove unused imports across codebase
Removed unused imports from 36 files including:
- Unused stdlib imports (json, time, re, os, signal, etc.)
- Unused typing imports (List, Dict, Optional, Tuple, Sequence, etc.)
- Unused langchain imports (AIMessage, ChatOpenAI, etc.)
- Unused langgraph imports (END, StateGraph, START, ToolNode, etc.)
- Unused project imports (DataLoader, get_config, parse_date, etc.)

Preserved intentional re-exports in:
- tradingagents/agents/utils/agent_utils.py (re-exports tool functions)
- tradingagents/dataflows/alpha_vantage.py (re-exports submodule functions)
- All __init__.py files

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-03 04:44:37 -05:00
Joseph O'Brien 1346e20b5e feat: create enums for status strings
Added AgentStatus enum for CLI agent tracking (pending, in_progress,
completed, error) and BacktestStatus enum for backtest results (pending,
running, completed, failed). Replaces string literals with type-safe
enum values throughout the codebase.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-03 04:13:59 -05:00
Joseph O'Brien b8be981bc8 feat: add type hints to function signatures across codebase
Added return type hints and parameter type hints to functions in:
- tradingagents/graph/trading_graph.py
- tradingagents/graph/reflection.py
- tradingagents/dataflows/y_finance.py
- tradingagents/dataflows/local.py
- tradingagents/backtesting/engine.py
- cli/analysis.py, cli/discovery.py, cli/display.py, cli/state.py, cli/backtest_cmd.py

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-03 03:50:49 -05:00
Joseph O'Brien 293df9c552 refactor: split cli/main.py into modular components
Extract cli/main.py (1916 lines) into focused modules:
- cli/state.py: MessageBuffer class for state management
- cli/display.py: Layout, progress tables, and report display functions
- cli/discovery.py: Trending stock discovery flow and UI
- cli/analysis.py: Stock analysis flow and chunk processing
- cli/backtest_cmd.py: Backtesting command and strategies

main.py reduced from 1916 to 110 lines, serving as entry point only

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-03 03:29:42 -05:00