Skip to content

Commit

Permalink
Merge 2572363 into 0c21a0f
Browse files Browse the repository at this point in the history
  • Loading branch information
jlstevens committed Feb 4, 2019
2 parents 0c21a0f + 2572363 commit 23439fb
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions holoviews/core/options.py
Expand Up @@ -98,6 +98,26 @@ def __init__(self, obj, mode=None):
self._obj = obj


def get(self, group=None, backend=None):
"""Returns the corresponding Options object.
Args:
group: The options group. Flattens across groups if None.
backend: Current backend if None otherwise chosen backend.
Returns:
Options object associated with the object containing the
applied option keywords.
"""
keywords = {}
groups = Options._option_groups if group is None else [group]
backend = backend if backend else Store.current_backend
for group in groups:
optsobj = Store.lookup_options(backend, self._obj, group)
keywords = dict(keywords, **optsobj.kwargs)
return Options(**keywords)


def __call__(self, *args, **kwargs):
"""Applies nested options definition.
Expand Down

0 comments on commit 23439fb

Please sign in to comment.