From 05b5120394644a7fc8e19ae4fc4f203d8727c486 Mon Sep 17 00:00:00 2001 From: David Bau Date: Tue, 30 Aug 2022 03:01:13 -0400 Subject: [PATCH] Allow omission of fig argument. --- baukit/plotwidget.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/baukit/plotwidget.py b/baukit/plotwidget.py index 56f601a..90dcead 100644 --- a/baukit/plotwidget.py +++ b/baukit/plotwidget.py @@ -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: