-
Notifications
You must be signed in to change notification settings - Fork 284
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
Prevent warning repeats #5506
base: main
Are you sure you want to change the base?
Prevent warning repeats #5506
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #5506 +/- ##
==========================================
- Coverage 89.71% 89.37% -0.34%
==========================================
Files 90 89 -1
Lines 22815 22456 -359
Branches 5438 5388 -50
==========================================
- Hits 20468 20071 -397
- Misses 1617 1639 +22
- Partials 730 746 +16 ☔ View full report in Codecov by Sentry. |
Thanks @ESadek-MO and @stephenworsley for exploring alternative solutions (#5536). I'm still unhappy that this PR effectively disables some of the Thankfully, we now have documentation about Iris warnings:
|
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.
See my previous comment: #5506 (comment)
03731a4
to
730eb38
Compare
1b9dfea
to
a503041
Compare
2e67ac0
to
f501454
Compare
for more information, see https://pre-commit.ci
🚀 Pull Request
Attempts to address #5464, the result of investigations done for #5499.
This approach attempts to align the behaviour of warnings more closely with what ought to be the default behaviour of warnings. This currently comes at the expense of "hard coding" some of this behaviour to match what you would get when calling
warnings.simplefilter("default")
. When settingwarnings.simplefilter("always")
the expected behaviour would be for all warnings to be raised, however some will be caught, as per the behaviour ofwarnings.simplefilter("default")
. Similarly, this does not go as far as to guarantee thatwarnings.simplefilter("once")
will behave as expected, though it should not introduce any duplications that weren't already present.The above problems could potentially be solved with some additional logic if I could figure out a way to determine which of these behaviours
warnings
expected at any given point in the code. Otherwise, it may be an acceptable payoff to hardcode this behaviour if it would reduce unwanted warnings in most cases.