-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add context manager for register_type #470
Conversation
Codecov Report
@@ Coverage Diff @@
## main #470 +/- ##
==========================================
+ Coverage 88.05% 88.08% +0.03%
==========================================
Files 31 31
Lines 4170 4189 +19
==========================================
+ Hits 3672 3690 +18
- Misses 498 499 +1
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
magicgui/type_map.py
Outdated
_RETURN_CALLBACKS[_type_] = prev_return_callback # type: ignore | ||
if prev_type_def is null: | ||
_TYPE_DEFS.pop(_type_, None) | ||
else: | ||
_TYPE_DEFS[_type_] = prev_type_def # type: ignore |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looking at test and coverage messages, it looks like something is wrong. Or are default widgets stored outside _TYPE_DEFS
dict?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
default widgets are stored outside of _TYPE_DEFS
(for better or worse)
many thanks for the review @Czaki . updated |
closes #466
@Czaki ... if you have a moment to review, it would be appreciated!