-
Notifications
You must be signed in to change notification settings - Fork 49
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: Implement TypeMap
to enable module specific type map registration
#677
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #677 +/- ##
==========================================
+ Coverage 88.97% 89.00% +0.03%
==========================================
Files 39 39
Lines 4743 4777 +34
==========================================
+ Hits 4220 4252 +32
- Misses 523 525 +2 ☔ View full report in Codecov by Sentry. |
It seems |
The current problem is caused by |
Ah, that's why all the tests including python<3.13 are failing. |
flexparser is fixed ... could you merge conflicts now that #671 is merged? |
Is the failed test a random connection error? Everything is working as expected :) |
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.
this is excellent work @hanjinliu! thank you so much.
TypeMap
to enable module specific type map registrationTypeMap
to enable module specific type map registration
Closes #676
(I said
WidgetStore
in the issue but it turned out that there were more things to store so I simply named itTypeMap
🥲 )All the functions that used the global type map before are now referring to the global instance of
TypeMap
.Example:
Some functions, such as
magicgui
andcreate_widget
, no longer need to be in the files they used to be, but they are still in the original files in case some users use private import such asfrom magicgui.type_map._magicgui import magicgui
. Probably we need some refactoring in the future because there are some dirty import statements inside functions to avoid circular import.