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

Function _make_axes_method

lib/matplotlib/axes/_axes.py:52–67  ·  view source on GitHub ↗

Patch the qualname for functions that are directly added to Axes. Some Axes functionality is defined in functions in other submodules. These are simply added as attributes to Axes. As a result, their ``__qualname__`` is e.g. only "table" and not "Axes.table". This function fixe

(func)

Source from the content-addressed store, hash-verified

50
51
52def _make_axes_method(func):
53 """
54 Patch the qualname for functions that are directly added to Axes.
55
56 Some Axes functionality is defined in functions in other submodules.
57 These are simply added as attributes to Axes. As a result, their
58 ``__qualname__`` is e.g. only "table" and not "Axes.table". This
59 function fixes that.
60
61 Note that the function itself is patched, so that
62 ``matplotlib.table.table.__qualname__` will also show "Axes.table".
63 However, since these functions are not intended to be standalone,
64 this is bearable.
65 """
66 func.__qualname__ = f"Axes.{func.__name__}"
67 return func
68
69
70class _GroupedBarReturn:

Callers 1

AxesClass · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…