From 167bcb36ce79cdaffbe49bb60754632bf55d1b70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?F=C3=A9lix=20Boisselier?= Date: Sat, 23 Nov 2024 23:04:41 +0100 Subject: [PATCH] Replace mutable default logo position argument with None Co-authored-by: sourcery-ai[bot] <58596630+sourcery-ai[bot]@users.noreply.github.com> --- shaketune/graph_creators/plotter.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/shaketune/graph_creators/plotter.py b/shaketune/graph_creators/plotter.py index 1e4efc5..b023fb2 100644 --- a/shaketune/graph_creators/plotter.py +++ b/shaketune/graph_creators/plotter.py @@ -47,7 +47,9 @@ def __init__(self): image_path = os.path.join(current_dir, 'klippain.png') self.logo_image = plt.imread(image_path) - def add_logo(self, fig, position=[0.001, 0.894, 0.105, 0.105]): # noqa: B006 + def add_logo(self, fig, position=None): # noqa: B006 + if position is None: + position = [0.001, 0.894, 0.105, 0.105] ax_logo = fig.add_axes(position, anchor='NW') ax_logo.imshow(self.logo_image) ax_logo.axis('off')