chore(lint): make the repository ruff-clean under the strict select
Clear the deferred full-repo lint backlog so the whole tree passes the strict ruff select (E,W,F,I,B,UP,C4,SIM). Mechanical fixes dominate: import sorting, pep585/604 annotations, dropped dead imports, and whitespace. The few semantic changes are behavior-preserving: declare __all__ on the agent_utils and alpha_vantage re-export hubs; expand 'from x import *' to explicit names; use immutable tuple defaults instead of mutable list defaults; contextlib.suppress for try/except/pass; and narrow an over-broad assertRaises.
This commit is contained in:
59 files changed
+315
-293
No files matched your search
@@ -1,10 +1,25 @@
|
||||
# TradingAgents/graph/setup.py
|
||||
|
||||
from typing import Any, Dict
|
||||
from typing import Any
|
||||
|
||||
from langgraph.graph import END, START, StateGraph
|
||||
from langgraph.prebuilt import ToolNode
|
||||
|
||||
from tradingagents.agents import *
|
||||
from tradingagents.agents import (
|
||||
create_aggressive_debator,
|
||||
create_bear_researcher,
|
||||
create_bull_researcher,
|
||||
create_conservative_debator,
|
||||
create_fundamentals_analyst,
|
||||
create_market_analyst,
|
||||
create_msg_delete,
|
||||
create_neutral_debator,
|
||||
create_news_analyst,
|
||||
create_portfolio_manager,
|
||||
create_research_manager,
|
||||
create_sentiment_analyst,
|
||||
create_trader,
|
||||
)
|
||||
from tradingagents.agents.utils.agent_states import AgentState
|
||||
|
||||
from .analyst_execution import build_analyst_execution_plan
|
||||
@@ -18,7 +33,7 @@ class GraphSetup:
|
||||
self,
|
||||
quick_thinking_llm: Any,
|
||||
deep_thinking_llm: Any,
|
||||
tool_nodes: Dict[str, ToolNode],
|
||||
tool_nodes: dict[str, ToolNode],
|
||||
conditional_logic: ConditionalLogic,
|
||||
analyst_concurrency_limit: int = 1,
|
||||
):
|
||||
@@ -30,7 +45,7 @@ class GraphSetup:
|
||||
self.analyst_concurrency_limit = analyst_concurrency_limit
|
||||
|
||||
def setup_graph(
|
||||
self, selected_analysts=["market", "social", "news", "fundamentals"]
|
||||
self, selected_analysts=("market", "social", "news", "fundamentals")
|
||||
):
|
||||
"""Set up and compile the agent workflow graph.
|
||||
|
||||
|
||||
Reference in new issue
Block a user