Skip to content

Commit b81c09c

Browse files
authored
Merge pull request #146 from bmorris3/ref-bugfix
bugfix: skip `ref` validation when Sidecar(ref=None)
2 parents 45c9fe6 + 85ff734 commit b81c09c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

sidecar/sidecar.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,10 @@ class Sidecar(Output):
3333

3434
@observe('ref')
3535
def _validate_ref_anchor(self, *args):
36-
if self.ref and self.ref.anchor == 'right':
36+
if self.ref is None:
37+
return
38+
39+
if self.ref.anchor == 'right':
3740
warnings.warn(
3841
"`ref` cannot be set when `ref.anchor == 'right'`. "
3942
"Proceeding with `ref = None`.", UserWarning

0 commit comments

Comments
 (0)