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:
Yijia-Xiao committed 2026-06-14 16:38:36 +00:00
1 parent cbc5f67d42
commit e3bc872982
59 files changed
+315 -293

No files matched your search

+6 -7
View File
@@ -19,11 +19,10 @@ so that:
from __future__ import annotations
from enum import Enum
from typing import Literal, Optional
from typing import Literal
from pydantic import BaseModel, Field
# ---------------------------------------------------------------------------
# Shared rating types
# ---------------------------------------------------------------------------
@@ -124,15 +123,15 @@ class TraderProposal(BaseModel):
"the research plan. Two to four sentences."
),
)
entry_price: Optional[float] = Field(
entry_price: float | None = Field(
default=None,
description="Optional entry price target in the instrument's quote currency.",
)
stop_loss: Optional[float] = Field(
stop_loss: float | None = Field(
default=None,
description="Optional stop-loss price in the instrument's quote currency.",
)
position_sizing: Optional[str] = Field(
position_sizing: str | None = Field(
default=None,
description="Optional sizing guidance, e.g. '5% of portfolio'.",
)
@@ -196,11 +195,11 @@ class PortfolioDecision(BaseModel):
"incorporate them; otherwise rely solely on the current analysis."
),
)
price_target: Optional[float] = Field(
price_target: float | None = Field(
default=None,
description="Optional target price in the instrument's quote currency.",
)
time_horizon: Optional[str] = Field(
time_horizon: str | None = Field(
default=None,
description="Optional recommended holding period, e.g. '3-6 months'.",
)