Skip to content

Commit

Permalink
style fixes by ruff
Browse files Browse the repository at this point in the history
  • Loading branch information
wspr authored and github-actions[bot] committed Apr 1, 2024
1 parent d322875 commit b645f7f
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions ausankey/ausankey.py
Original file line number Diff line number Diff line change
Expand Up @@ -237,9 +237,9 @@ def __init__(
title_font=None,
sort="bottom", # "top", "bottom", "none"
valign="bottom", # "top","center"
value_format = ".0f",
value_gap = None,
value_font = None,
value_format=".0f",
value_gap=None,
value_font=None,
value_loc=("right", "left", "left"),
):
self.ax = ax
Expand Down Expand Up @@ -282,7 +282,6 @@ def __init__(
self.value_font = value_font or {}
self.value_loc = value_loc


def setup(self, data):
self.data = data

Expand Down Expand Up @@ -348,7 +347,6 @@ def setup(self, data):
self.ax = self.ax or plt.gca()
self.ax.axis("off")


def weight_labels(self):
self.weight_sum = np.empty(self.num_stages)

Expand Down Expand Up @@ -378,7 +376,6 @@ def weight_labels(self):

self.weight_sum[ii] = pd.Series(self.node_sizes[ii].values()).sum()


def plot_frame(self):
"""Plot frame on top/bottom edges"""

Expand All @@ -405,7 +402,6 @@ def plot_frame(self):
lw=self.frame_lw,
)


def subplot(self, ii):
"""Subroutine for plotting horizontal sections of the Sankey plot
Expand Down Expand Up @@ -643,9 +639,9 @@ def draw_label(x, y, label, ha):
ind = 2
else:
ind = 1
if self.value_loc[ind] in ("left","both"):
if self.value_loc[ind] in ("left", "both"):
sides.append(0)
if self.value_loc[ind] in ("right","both"):
if self.value_loc[ind] in ("right", "both"):
sides.append(1)
for lr in sides:
self.ax.text(
Expand Down

0 comments on commit b645f7f

Please sign in to comment.