Skip to content

Commit 00b03db

Browse files
committed
Opts line magic no longer generates custom trees
1 parent e4183d9 commit 00b03db

1 file changed

Lines changed: 3 additions & 6 deletions

File tree

holoviews/ipython/magics.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -482,18 +482,15 @@ def _format_options_error(cls, err):
482482
return "Keyword <b>%r</b> not one of following %s options:<br><br><b>%s</b>" % info
483483

484484
@classmethod
485-
def register_custom_spec(cls, spec, cellmagic):
485+
def register_custom_spec(cls, spec):
486486
spec, _ = StoreOptions.expand_compositor_keys(spec)
487487
try:
488488
StoreOptions.validate_spec(spec)
489489
except OptionError as e:
490490
cls.error_message = cls._format_options_error(e)
491491
return None
492492

493-
if cellmagic:
494-
cls.opts_spec = spec
495-
else:
496-
cls.opts_spec = spec
493+
cls.opts_spec = spec
497494

498495

499496
@line_cell_magic
@@ -529,8 +526,8 @@ def opts(self, line='', cell=None):
529526
display(HTML("<b>Invalid syntax</b>: Consult <tt>%%opts?</tt> for more information."))
530527
return
531528

532-
self.register_custom_spec(spec, cell is not None)
533529
if cell:
530+
self.register_custom_spec(spec)
534531
# Process_element is invoked when the cell is run.
535532
self.shell.run_cell(cell, store_history=STORE_HISTORY)
536533
else:

0 commit comments

Comments
 (0)