MCPcopy Create free account
hub / github.com/holoviz/hvplot / __getattribute__

Method __getattribute__

hvplot/interactive.py:469–491  ·  view source on GitHub ↗
(self, name)

Source from the content-addressed store, hash-verified

467 return new
468
469 def __getattribute__(self, name):
470 self_dict = super().__getattribute__('__dict__')
471 if not self_dict.get('_init'):
472 return super().__getattribute__(name)
473
474 current = self_dict['_current_']
475 method = self_dict['_method']
476 if method:
477 current = getattr(current, method)
478 # Getting all the public attributes available on the current object,
479 # e.g. `sum`, `head`, etc.
480 extras = [d for d in dir(current) if not d.startswith('_')]
481 if name in extras and name not in super().__dir__():
482 new = self._resolve_accessor()
483 # Setting the method name for a potential use later by e.g. an
484 # operator or method, as in `dfi.A > 2`. or `dfi.A.max()`
485 new._method = name
486 try:
487 new.__doc__ = getattr(current, name).__doc__
488 except Exception:
489 pass
490 return new
491 return super().__getattribute__(name)
492
493 @staticmethod
494 def _get_ax_fn():

Callers

nothing calls this directly

Calls 2

_resolve_accessorMethod · 0.95
__dir__Method · 0.45

Tested by

no test coverage detected