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

Class _hvplot

hvplot/interactive.py:874–905  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

872
873
874class _hvplot:
875 _kinds = tuple(HoloViewsConverter._kind_mapping)
876
877 __slots__ = ['_interactive']
878
879 def __init__(self, _interactive):
880 self._interactive = _interactive
881
882 def __call__(self, *args, _kind=None, **kwargs):
883 # The underscore in _kind is to not overwrite it
884 # if 'kind' is in kwargs and the function
885 # is used with partial.
886 if _kind and 'kind' in kwargs:
887 raise TypeError(f"{_kind}() got an unexpected keyword argument 'kind'")
888 if _kind:
889 kwargs['kind'] = _kind
890
891 new = self._interactive._resolve_accessor()
892 transform = new._transform
893 transform = type(transform)(transform, 'hvplot', accessor=True)
894 dmap = 'kind' not in kwargs or isinstance(kwargs['kind'], str)
895 return new._clone(transform(*args, **kwargs), dmap=dmap)
896
897 def __getattr__(self, attr):
898 if attr in self._kinds:
899 return partial(self, _kind=attr)
900 else:
901 raise AttributeError(f"'hvplot' object has no attribute '{attr}'")
902
903 def __dir__(self):
904 # This function is for autocompletion
905 return self._interactive._obj.hvplot.__all__

Callers 1

__init__Method · 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…