Skip to content

Commit

Permalink
Use a locally-defined function rather than a lambda.
Browse files Browse the repository at this point in the history
  • Loading branch information
Carifio24 committed Dec 19, 2024
1 parent 7faaee7 commit 77027cd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion glue_ar/qt/export_dialog.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,12 @@ def remove_label_callback(widget, update_label=update_label):
except ValueError:
pass

Check warning on line 76 in glue_ar/qt/export_dialog.py

View check run for this annotation

Codecov / codecov/patch

glue_ar/qt/export_dialog.py#L73-L76

Added lines #L73 - L76 were not covered by tests

def on_widget_destroyed(widget, cb=remove_label_callback):
cb(widget)

Check warning on line 79 in glue_ar/qt/export_dialog.py

View check run for this annotation

Codecov / codecov/patch

glue_ar/qt/export_dialog.py#L79

Added line #L79 was not covered by tests

update_label(value)
add_callback(instance, property, update_label)
widget.destroyed.connect(lambda *args, cb=remove_label_callback: cb(widget))
widget.destroyed.connect(on_widget_destroyed)

steps = round((max - min) / step)
widget.setMinimum(0)
Expand Down

0 comments on commit 77027cd

Please sign in to comment.