Closed dweindl closed 5 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 77.60%. Comparing base (
6b05ddd
) to head (7bdeb07
).
Hmm, is it not possible to manage this using a context manager? Seems rather difficult to keep stack levels cohesive throughout the package.
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, stacklevel=2
always makes sense, because this will show the location of the deprecated import statement.
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,
stacklevel=2
always makes sense, because this will show the location of the deprecated import statement.
Yes, my concern is more that the next time we add a warning, we will forget to add the stacklevel=2
argument.
my concern is more that the next time we add a warning, we will forget to add the
stacklevel=2
argument.
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.