-
-
Notifications
You must be signed in to change notification settings - Fork 410
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
Add deprecation message to CallDefault function partly resolves issue#6257 #6901
Conversation
Hi @MarchisLost - thanks for your contribution! Would you mind changing the title of your PR to be more descriptive of the problem you are solving? This will help your PR get more visibility and will help the maintainers understand your work better. In your case, I would suggest something like "Add deprecation message to CallDefault function" or something similar. Welcome and let us know if you have questions 😄 |
Hi, thank you for the feedback. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #6901 +/- ##
==========================================
- Coverage 92.48% 92.43% -0.06%
==========================================
Files 614 614
Lines 55181 55182 +1
==========================================
- Hits 51035 51008 -27
- Misses 4146 4174 +28 ☔ View full report in Codecov by Sentry. |
Hi @MarchisLost thanks for the PR! I'm pinging @melonora for review, because I think this is similar to #6836 that he recently looked at |
napari/utils/misc.py
Outdated
warnings.warn( | ||
trans._( | ||
'`CallDefault` is deprecated since 0.4.6 and will be removed in the future', | ||
), | ||
category=DeprecationWarning, | ||
) |
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.
warnings.warn( | |
trans._( | |
'`CallDefault` is deprecated since 0.4.6 and will be removed in the future', | |
), | |
category=DeprecationWarning, | |
) | |
warnings.warn( | |
trans._( | |
'`CallDefault` is deprecated in napari v0.5.0 and will be removed in v0.6.0.', | |
), | |
category=DeprecationWarning, | |
) |
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.
Thanks @MarchisLost (interesting name haha) and welcome to napari! I have checked and indeed this does not seem to be used at all. However, for good practice we have 1 release always for warning that it is deprecated and then the release after that we remove. If we slightly change the message we are good to go for merging this one. Once you have accepted the suggestion I will mark your PR ready for merge and then if nobody else has obligations we merge within a day.
Approved! Thanks:) |
Hi @melonora thank you! |
in it goes! |
References and relevant issues
Partly closes #6257 by adding a deprecation message to the CallDefault function that seems to not be used since #2266
Description
trans._("some string")
to make them localizable.(For more information see our translations guide).