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

Skip to content

Commit 25482d5

Browse files
committed
MNT: Add provisional get_backend(resolve=False) flag
The default is `resolve=True` for now, so that this introduction is completely backward-compatible. The provisional introduction anticipates planned changes for the backend resolution (#26406 (comment)). If all plays out as intended, this prolongs the range of releases for the migration: If we start deprecating `rcParams._get("backend")` say in 3.11, people can immediately switch to `get_backend(resolve=False)` and their code still runs on 3.10 without version gating. The worst that can happen is that the introduced flag was not helpful and we remove it again, which is easy because it's provisional.
1 parent d33a44b commit 25482d5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/matplotlib/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1296,7 +1296,7 @@ def use(backend, *, force=True):
12961296
rcParams['backend'] = os.environ.get('MPLBACKEND')
12971297

12981298

1299-
def get_backend(*, resolve: bool = True):
1299+
def get_backend(*, resolve=True):
13001300
"""
13011301
Return the name of the current backend.
13021302

0 commit comments

Comments
 (0)