Fix linting issues: line length, import sorting, unused variables
- Set ruff/black line length to 120 - Reformatted code with black - Fixed import ordering with ruff - Disabled lint for UI component files with long CSS strings - Updated pyproject.toml with proper tool configuration
This commit is contained in:
@@ -41,12 +41,28 @@ def sample_option_chain(sample_portfolio: LombardPortfolio) -> dict[str, object]
|
||||
"updated_at": datetime(2026, 3, 21, 0, 0).isoformat(),
|
||||
"source": "mock",
|
||||
"calls": [
|
||||
{"strike": round(spot * 1.05, 2), "premium": round(spot * 0.03, 2), "expiry": "2026-06-19"},
|
||||
{"strike": round(spot * 1.10, 2), "premium": round(spot * 0.02, 2), "expiry": "2026-09-18"},
|
||||
{
|
||||
"strike": round(spot * 1.05, 2),
|
||||
"premium": round(spot * 0.03, 2),
|
||||
"expiry": "2026-06-19",
|
||||
},
|
||||
{
|
||||
"strike": round(spot * 1.10, 2),
|
||||
"premium": round(spot * 0.02, 2),
|
||||
"expiry": "2026-09-18",
|
||||
},
|
||||
],
|
||||
"puts": [
|
||||
{"strike": round(spot * 0.95, 2), "premium": round(spot * 0.028, 2), "expiry": "2026-06-19"},
|
||||
{"strike": round(spot * 0.90, 2), "premium": round(spot * 0.018, 2), "expiry": "2026-09-18"},
|
||||
{
|
||||
"strike": round(spot * 0.95, 2),
|
||||
"premium": round(spot * 0.028, 2),
|
||||
"expiry": "2026-06-19",
|
||||
},
|
||||
{
|
||||
"strike": round(spot * 0.90, 2),
|
||||
"premium": round(spot * 0.018, 2),
|
||||
"expiry": "2026-09-18",
|
||||
},
|
||||
],
|
||||
}
|
||||
|
||||
@@ -58,7 +74,10 @@ def mock_yfinance_data(monkeypatch):
|
||||
# datetime.UTC symbol used in the data_service module.
|
||||
from app.services import data_service as data_service_module
|
||||
|
||||
history = pd.DataFrame({"Close": [458.0, 460.0]}, index=pd.date_range("2026-03-20", periods=2, freq="D"))
|
||||
history = pd.DataFrame(
|
||||
{"Close": [458.0, 460.0]},
|
||||
index=pd.date_range("2026-03-20", periods=2, freq="D"),
|
||||
)
|
||||
|
||||
class FakeTicker:
|
||||
def __init__(self, symbol: str) -> None:
|
||||
|
||||
Reference in New Issue
Block a user