Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 48db078

Browse filesBrowse files
committed
MNT: make some environment checking case insensitive
1 parent f33f5ab commit 48db078
Copy full SHA for 48db078

File tree

Expand file treeCollapse file tree

1 file changed

+6
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+6
-1
lines changed

‎lib/matplotlib/backends/qt_compat.py

Copy file name to clipboardExpand all lines: lib/matplotlib/backends/qt_compat.py
+6-1Lines 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)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.