8000 Remove INTERACTIVE_NON_WEB backend filter · matplotlib/matplotlib@ea74018 · GitHub
[go: up one dir, main page]

Skip to content

Commit ea74018

Browse files
committed
Remove INTERACTIVE_NON_WEB backend filter
1 parent 4d3d1a0 commit ea74018

File tree

4 files changed

+3
-10
lines changed

4 files changed

+3
-10
lines changed

lib/matplotlib/backends/registry.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,7 @@
33

44
class BackendFilter(Enum):
55
INTERACTIVE = 0
6-
INTERACTIVE_NON_WEB = 1
7-
NON_INTERACTIVE = 2
6+
NON_INTERACTIVE = 1
87

98

109
class BackendRegistry:
@@ -47,9 +46,6 @@ def backend_for_gui_framework(self, framework):
4746
def list_builtin(self, filter_=None):
4847
if filter_ == BackendFilter.INTERACTIVE:
4948
return self._BUILTIN_INTERACTIVE
50-
elif filter_ == BackendFilter.INTERACTIVE_NON_WEB:
51-
return list(filter(lambda x: x.lower() not in ("webagg", "nbagg"),
52-
self._BUILTIN_INTERACTIVE))
5349
elif filter_ == BackendFilter.NON_INTERACTIVE:
5450
return self._BUILTIN_NOT_INTERACTIVE
5551

lib/matplotlib/backends/registry.pyi

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ from enum import Enum
33

44
class BackendFilter(Enum):
55
INTERACTIVE: int
6-
INTERACTIVE_NON_WEB: int
76
NON_INTERACTIVE: int
87

98

lib/matplotlib/pyplot.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2498,7 +2498,8 @@ def polar(*args, **kwargs) -> list[Line2D]:
24982498
# is compatible with the current running interactive framework.
24992499
if (rcParams["backend_fallback"]
25002500
and rcParams._get_backend_or_none() in ( # type: ignore
2501-
backend_registry.list_builtin(BackendFilter.INTERACTIVE_NON_WEB))
2501+
set(backend_registry.list_builtin(BackendFilter.INTERACTIVE)) -
2502+
{'WebAgg', 'nbAgg'})
25022503
and cbook._get_running_interactive_framework()): # type: ignore
25032504
rcParams._set("backend", rcsetup._auto_backend_sentinel) # type: ignore
25042505

lib/matplotlib/tests/test_backend_registry.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,9 +45,6 @@ def test_list_builtin():
4545
['GTK3Agg', 'GTK3Cairo', 'GTK4Agg', 'GTK4Cairo', 'MacOSX', 'nbAgg', 'QtAgg',
4646
'QtCairo', 'Qt5Agg', 'Qt5Cairo', 'TkAgg', 'TkCairo', 'WebAgg', 'WX', 'WXAgg',
4747
'WXCairo']),
48-
(BackendFilter.INTERACTIVE_NON_WEB,
49-
['GTK3Agg', 'GTK3Cairo', 'GTK4Agg', 'GTK4Cairo', 'MacOSX', 'QtAgg', 'QtCairo',
50-
'Qt5Agg', 'Qt5Cairo', 'TkAgg', 'TkCairo', 'WX', 'WXAgg', 'WXCairo']),
5148
(BackendFilter.NON_INTERACTIVE,
5249
['agg', 'cairo', 'pdf', 'pgf', 'ps', 'svg', 'template']),
5350
]

0 commit comments

Comments
 (0)
0