You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The warnings.warn method uses a stacklevel of 1 by default, which limits the rendered stack trace to that of the line on which the warn method is called.
reading this, it implies that if a higher number is set, then the stack trace will contain multiple entries
It's recommended to use a stacklevel of 2 or higher, give the caller more context about the warning.
- give+ giving
OR
+ to give
maybe
The `warnings.warn` method uses a stacklevel of 1 by default, which will output a stack frame of the line on which the `warn` method is called. Setting it to a higher number will output a stack frame from higher up the stack.
It's recommended to use a `stacklevel` of 2 or higher, to give the caller a more appropriate context about the warning.
The text was updated successfully, but these errors were encountered:
https://docs.astral.sh/ruff/rules/no-explicit-stacklevel/#no-explicit-stacklevel-b028
reading this, it implies that if a higher number is set, then the stack trace will contain multiple entries
maybe
The text was updated successfully, but these errors were encountered: