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

Method __getitem__

lib/matplotlib/__init__.py:786–794  ·  view source on GitHub ↗
(self, key)

Source from the content-addressed store, hash-verified

784 self._set(key, cval)
785
786 def __getitem__(self, key):
787 # In theory, this should only ever be used after the global rcParams
788 # has been set up, but better be safe e.g. in presence of breakpoints.
789 if key == "backend" and self is globals().get("rcParams"):
790 val = self._get(key)
791 if val is rcsetup._auto_backend_sentinel:
792 from matplotlib import pyplot as plt
793 plt.switch_backend(rcsetup._auto_backend_sentinel)
794 return self._get(key)
795
796 def _get_backend_or_none(self):
797 """Get the requested backend, if any, without triggering resolution."""

Callers 1

_getMethod · 0.45

Calls 2

_getMethod · 0.95
getMethod · 0.45

Tested by

no test coverage detected