MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / _ensure_has_backend

Method _ensure_has_backend

lib/matplotlib/__init__.py:758–768  ·  view source on GitHub ↗

Ensure that a "backend" entry exists. Normally, the default matplotlibrc file contains *no* entry for "backend" (the corresponding line starts with ##, not #; we fill in _auto_backend_sentinel in that case. However, packagers can set a different default backend

(self)

Source from the content-addressed store, hash-verified

756 dict.update(self, other_params)
757
758 def _ensure_has_backend(self):
759 """
760 Ensure that a "backend" entry exists.
761
762 Normally, the default matplotlibrc file contains *no* entry for "backend" (the
763 corresponding line starts with ##, not #; we fill in _auto_backend_sentinel
764 in that case. However, packagers can set a different default backend
765 (resulting in a normal `#backend: foo` line) in which case we should *not*
766 fill in _auto_backend_sentinel.
767 """
768 dict.setdefault(self, "backend", rcsetup._auto_backend_sentinel)
769
770 def __setitem__(self, key, val):
771 if (key == "backend"

Callers 1

__init__.pyFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected