Skip to content

Commit f852721

Browse files
committed
Small changes from review
1 parent de94746 commit f852721

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

lib/matplotlib/pyplot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ def switch_backend(newbackend: str) -> None:
305305

306306
if (current_framework and
307307
(backend := backend_registry.backend_for_gui_framework(
308-
current_framework))):
308+
current_framework))):
309309
candidates = [backend]
310310
else:
311311
candidates = []

lib/matplotlib/tests/test_backend_registry.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,11 @@ def test_list_builtin():
3131
backends = backend_registry.list_builtin()
3232
assert not has_duplicates(backends)
3333
# Compare using sets as order is not important
34-
assert set(backends) == set((
34+
assert {*backends} == {
3535
'GTK3Agg', 'GTK3Cairo', 'GTK4Agg', 'GTK4Cairo', 'MacOSX', 'nbAgg', 'QtAgg',
3636
'QtCairo', 'Qt5Agg', 'Qt5Cairo', 'TkAgg', 'TkCairo', 'WebAgg', 'WX', 'WXAgg',
3737
'WXCairo', 'agg', 'cairo', 'pdf', 'pgf', 'ps', 'svg', 'template',
38-
))
38+
}
3939

4040

4141
@pytest.mark.parametrize(
@@ -53,4 +53,4 @@ def test_list_builtin_with_filter(filter, expected):
5353
backends = backend_registry.list_builtin(filter)
5454
assert not has_duplicates(backends)
5555
# Compare using sets as order is not important
56-
assert set(backends) == set(expected)
56+
assert {*backends} == {*expected}

0 commit comments

Comments
 (0)