Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ad91933

Browse files
committed
MNT: do not special-case backend in rc_file_defaults or rc_file
The 'backend' rcParam is already skipped by the STYLE_BLACKLIST.
1 parent a2bc1b9 commit ad91933

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

lib/matplotlib/__init__.py

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1229,8 +1229,7 @@ def rc_file_defaults():
12291229
warnings.simplefilter("ignore", mplDeprecation)
12301230
from .style.core import STYLE_BLACKLIST
12311231
rcParams.update({k: rcParamsOrig[k] for k in rcParamsOrig
1232-
if k not in STYLE_BLACKLIST and k != 'backend'})
1233-
rcParams['backend'] = dict.__getitem__(rcParamsOrig, 'backend')
1232+
if k not in STYLE_BLACKLIST})
12341233

12351234

12361235
def rc_file(fname):
@@ -1247,11 +1246,7 @@ def rc_file(fname):
12471246
from .style.core import STYLE_BLACKLIST
12481247
rc_from_file = rc_params_from_file(fname)
12491248
rcParams.update({k: rc_from_file[k] for k in rc_from_file
1250-
if k not in STYLE_BLACKLIST and k != 'backend'})
1251-
1252-
proposed_backend = dict.__getitem__(rc_from_file, 'backend')
1253-
if (proposed_backend is not rcsetup._auto_backend_sentinel):
1254-
rcParams['backend'] = proposed_backend
1249+
if k not in STYLE_BLACKLIST})
12551250

12561251

12571252
class rc_context:

0 commit comments

Comments
 (0)