Skip to content

Commit 7f5afe3

Browse files
committed
MNT: Don't rely on RcParams being a dict subclass in internal code
Eventually, we want to be able to remove the dict subclassing from RcParams, which will allow better initialization and handling. We've publically announced that people should not rely on dict in https://matplotlib.org/stable/api/prev_api_changes/api_changes_3.7.0.html#rcparams-type This is an internal cleanup step to remove the dict-assumption and a preparation for further refactoring.
1 parent 7e92959 commit 7f5afe3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/matplotlib/pyplot.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ def switch_backend(newbackend: str) -> None:
410410
switch_backend("agg")
411411
rcParamsOrig["backend"] = "agg"
412412
return
413-
old_backend = rcParams._get('backend') # prevents triggering backend resolution
413+
old_backend = rcParams._get('backend') # get without triggering backend resolution
414414

415415
module = backend_registry.load_backend_module(newbackend)
416416
canvas_class = module.FigureCanvas

0 commit comments

Comments
 (0)