-
Notifications
You must be signed in to change notification settings - Fork 652
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 default None -> UserWarning #4747
base: develop
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #4747 +/- ##
===========================================
- Coverage 93.65% 93.62% -0.03%
===========================================
Files 175 187 +12
Lines 21564 22630 +1066
Branches 3023 3023
===========================================
+ Hits 20195 21188 +993
- Misses 925 998 +73
Partials 444 444 ☔ View full report in Codecov by Sentry. |
# https://docs.python.org/3/library/warnings.html#warnings.warn | ||
# if category is None, the default UserWarning is used | ||
if category is None: | ||
category = UserWarning |
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.
Ah, this is a surprisingly simple fix, very nice. Confirming it also works in my hands.
I'll approve but not merge yet given the release cycle situation.
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.
It would be best if this was applied to something in our tests - i.e. some kind of testing by application.
Fixes #4746
Changes made in this Pull Request:
category=None
toUserWarning
by defaultWe don't appear to test our utilities anywhere so I haven't added a formal test -- but running it with #4744 worked.
PR Checklist
Developers certificate of origin
📚 Documentation preview 📚: https://mdanalysis--4747.org.readthedocs.build/en/4747/