From 7257dda0a9b00db0819b6d8d184fd0c1d2ddbc89 Mon Sep 17 00:00:00 2001 From: Robert Martin Date: Sun, 1 Dec 2024 14:16:10 -0500 Subject: [PATCH] minor code formatting --- pypfopt/discrete_allocation.py | 1 + pypfopt/plotting.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/pypfopt/discrete_allocation.py b/pypfopt/discrete_allocation.py index 11d00ee..d67f911 100644 --- a/pypfopt/discrete_allocation.py +++ b/pypfopt/discrete_allocation.py @@ -2,6 +2,7 @@ The ``discrete_allocation`` module contains the ``DiscreteAllocation`` class, which offers multiple methods to generate a discrete portfolio allocation from continuous weights. """ + import collections import cvxpy as cp diff --git a/pypfopt/plotting.py b/pypfopt/plotting.py index e46c663..54fcf48 100644 --- a/pypfopt/plotting.py +++ b/pypfopt/plotting.py @@ -174,7 +174,7 @@ def _plot_cla(cla, points, ax, show_assets, show_tickers, interactive): mode="markers", name="Max Sharpe Portfolio", marker=dict(size=12, symbol="x", color="coral"), - hovertemplate=f"Sharpe: %{{customdata[1]:.4}}
" + hovertemplate, + hovertemplate="Sharpe: %{{customdata[1]:.4}}
" + hovertemplate, ) ) else: