Skip to content

Commit

Permalink
Add support for literal opts format (#3301)
Browse files Browse the repository at this point in the history
  • Loading branch information
philippjfr authored and jlstevens committed Dec 17, 2018
1 parent e6329a6 commit 9154bbb
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions holoviews/core/util.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,14 +231,18 @@ def deprecated_opts_signature(args, kwargs):
Returns whether opts.apply_groups should be used (as a bool) and the
corresponding options.
"""
groups = ['plot','style', 'norm']
groups = {'plot','style', 'norm'}
opts = {kw for kw in kwargs if kw not in ('backend', 'clone')}
apply_groups = False
options = None
new_kwargs = {}
if len(args) > 0 and isinstance(args[0], dict):
apply_groups = True
if set(args[0].keys()) <= set(groups):
if (not set(args[0]).issubset(groups) and
all(isinstance(v, dict) and not set(v).issubset(groups)
for v in args[0].values())):
apply_groups = False
elif set(args[0].keys()) <= groups:
new_kwargs = args[0]
else:
options = args[0]
Expand Down

0 comments on commit 9154bbb

Please sign in to comment.