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)
| 50 | |
| 51 | |
| 52 | def _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 | |
| 70 | class _GroupedBarReturn: |
no outgoing calls
no test coverage detected
searching dependent graphs…