Skip to content

Commit 3eeb476

Browse files
committed
MNT: simplify string comparison
1 parent ce48a65 commit 3eeb476

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

lib/matplotlib/pyplot.py

+1-2
Original file line numberDiff line numberDiff line change
@@ -247,8 +247,7 @@ def switch_backend(newbackend):
247247
# Need to keep a global reference to the backend for compatibility reasons.
248248
# See https://github.com/matplotlib/matplotlib/issues/6092
249249
matplotlib.backends.backend = newbackend
250-
if not (isinstance(old_backend, str) and
251-
old_backend.lower() == newbackend.lower()):
250+
if not cbook._str_equal(old_backend, newbackend):
252251
close("all")
253252

254253

0 commit comments

Comments
 (0)