From b4a729f4a40286fff7cb557e4e14583082b0bf61 Mon Sep 17 00:00:00 2001 From: Josh Burnett Date: Thu, 13 Jun 2024 05:50:09 -0400 Subject: [PATCH] Make backend checks case-insensitive --- src/addcopyfighandler.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/addcopyfighandler.py b/src/addcopyfighandler.py index 280a2b9..eb7e909 100644 --- a/src/addcopyfighandler.py +++ b/src/addcopyfighandler.py @@ -45,7 +45,7 @@ import matplotlib.backends import matplotlib.pyplot as plt -__version__ = '3.2.0' +__version__ = '3.2.1' __version_info__ = tuple(int(i) if i.isdigit() else i for i in __version__.split('.')) oldfig = plt.figure @@ -137,7 +137,7 @@ def copyfig(fig=None, format=None, *args, **kwargs): print(f'Figure copied.') -elif 'Qt' in backend: +elif 'qt' in backend.lower(): # Use Qt version from matplotlib. import importlib @@ -191,7 +191,7 @@ def copyfig(fig=None, *args, **kwargs): print(f'Figure copied.') -elif ostype == 'linux' and backend == 'GTK3Agg': +elif ostype == 'linux' and backend.lower() == 'gtk3agg': # Only GTK 3 is supported, as GTK 4 has totally changed the way clipboard data is handled and I can't figure # it out. I'm totally open to someone else solving this and submitting a PR if they want. I don't use GTK. import subprocess