From 6d6df45f41c9fa83dabe8f90a4bc98956b7e100d Mon Sep 17 00:00:00 2001 From: Laurent Andriamifidy Date: Wed, 24 Mar 2021 13:50:42 +0100 Subject: [PATCH] ran 'pyupgrade --py36-plus gamestonk_terminal/options/volume.py' to pass tests --- gamestonk_terminal/options/volume.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gamestonk_terminal/options/volume.py b/gamestonk_terminal/options/volume.py index 4d6653e9364..ca2e7421adc 100644 --- a/gamestonk_terminal/options/volume.py +++ b/gamestonk_terminal/options/volume.py @@ -30,7 +30,6 @@ def volume_graph(raw_data, ticker_name, exp_date, volume_percentile_threshold=50 # Initialize the matplotlib figure _, ax = plt.subplots(figsize=(12, 10)) - sns.set_style(style="darkgrid") # make x axis symmetric axis_origin = max(abs(max(puts["oi+v"])), abs(max(calls["oi+v"]))) @@ -38,6 +37,8 @@ def volume_graph(raw_data, ticker_name, exp_date, volume_percentile_threshold=50 VOLUME_THRESHOLD = np.percentile(calls["oi+v"], PERCENTILE_THRESHOLD) + sns.set_style(style="darkgrid") + g = sns.barplot( x="oi+v", y="strike", @@ -87,7 +88,7 @@ def volume_graph(raw_data, ticker_name, exp_date, volume_percentile_threshold=50 # ax.axhline(max_pain_index, ls='--') # format ticklabels without - for puts g.set_xticks(g.get_xticks()) - xlabels = ["{:,.0f}".format(x).replace("-", "") for x in g.get_xticks()] + xlabels = [f"{x:,.0f}".replace("-", "") for x in g.get_xticks()] g.set_xticklabels(xlabels) plt.title( @@ -113,7 +114,6 @@ def volume_graph(raw_data, ticker_name, exp_date, volume_percentile_threshold=50 ] plt.legend(handles=handles[:], labels=labels) - sns.despine(left=True, bottom=True) plt.show()