8000 MNT: make some environment checking case insensitive · matplotlib/matplotlib@6311891 · GitHub
[go: up one dir, main page]

Skip to content

Commit 6311891

Browse files
committed
MNT: make some environment checking case insensitive
1 parent 996c410 commit 6311891

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lib/matplotlib/backends/qt_compat.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,12 @@
5757
# requested backend actually matches). Use dict.__getitem__ to avoid
5858
# triggering backend resolution (which can result in a partially but
5959
# incompletely imported backend_qt5).
60-
elif dict.__getitem__(mpl.rcParams, "backend") in ["Qt5Agg", "Qt5Cairo"]:
60+
elif (
61+
isinstance(dict.__getitem__(mpl.rcParams, "backend"), str) and
62+
dict.__getitem__(mpl.rcParams, "backend").lower() in [
63+
"qt5agg", "qt5cairo"
64+
]
65+
):
6166
if QT_API_ENV in ["pyqt5", "pyside2"]:
6267
QT_API = _ETS[QT_API_ENV]
6368
else:

0 commit comments

Comments
 (0)
0