Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Jan 24, 2022
1 parent 8d9da4f commit f5311b7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion magicgui/widgets/_bases/create_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def create_widget(

if widget_type:
options["widget_type"] = widget_type
wdg_class, opts = get_widget_class(value, annotation, options, is_result)
wdg_class, opts = get_widget_class(value, annotation, options, is_result)

if issubclass(wdg_class, Widget):
opts.update(kwargs.pop("options"))
Expand Down
2 changes: 2 additions & 0 deletions tests/test_magicgui.py
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,7 @@ class Sub(Base):
register_type(Base, return_callback=check_value)

try:

@magicgui
def func(a=1) -> int:
return a
Expand All @@ -460,6 +461,7 @@ def func2(a=1) -> Sub:
func2()
finally:
from magicgui.type_map import _RETURN_CALLBACKS

_RETURN_CALLBACKS.pop(int)
_RETURN_CALLBACKS.pop(Base)

Expand Down

0 comments on commit f5311b7

Please sign in to comment.