-
Notifications
You must be signed in to change notification settings - Fork 31
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 stacklevel to warnings #2421
Conversation
Make it easier to find out where warnings originate from.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #2421 +/- ##
===========================================
- Coverage 77.63% 77.60% -0.03%
===========================================
Files 324 324
Lines 20913 20913
Branches 1464 1464
===========================================
- Hits 16236 16230 -6
- Misses 4674 4680 +6
Partials 3 3
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Hmm, is it not possible to manage this using a context manager? Seems rather difficult to keep stack levels cohesive throughout the package. |
Finding the precise frame / code location where some deprecated argument is introduced is overkill in my opinion. For the module-level deprecation warnings, |
Yes, my concern is more that the next time we add a warning, we will forget to add the |
Oh, no worries, I'm happy to add a reminder: https://docs.astral.sh/ruff/rules/no-explicit-stacklevel/ |
Make it easier to find out where warnings originate from.