Allow omission of fig argument.

This commit is contained in:
David Bau
2022-08-30 03:01:13 -04:00
parent 2cfabd5f74
commit 05b5120394
+2 -2
View File
@@ -35,8 +35,8 @@ class PlotWidget(Img):
all_names = []
has_fig_argument = False
for i, (name, p) in enumerate(inspect.signature(redraw_rule).parameters.items()):
if i == 0:
assert p.default == inspect._empty, 'First arg of redraw rule should be the figure'
if i == 0 and p.default == inspect._empty:
# assert p.default == inspect._empty, 'First arg of redraw rule should be the figure'
has_fig_argument = True
else:
if name in init_args: