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
{{ message }}
Repository navigation
Most warnings calls do not set the stacklevel #10643
Calls to warnings.warn should usually set stacklevel=2 (or higher) so that the source line that gets displayed in the warnings message is the line triggering the code, not the line in mpl that has the warnings call (which is basically redundant with the warnings message itself). Right now most of the calls do not include the stacklevel argument.
Activity
tacaswell commentedon Mar 2, 2018
I am 👍 on adding
stacklevelto all of our warningsImportanceOfBeingErnest commentedon May 4, 2018
Interesting. Can the documentation state this as a general advise then? E.g. in logging-level or where else would that fit?
tacaswell commentedon May 4, 2018
re-opening an the issue that closed this only addressed a few warnings.
hsl-code commentedon May 9, 2018
I'd like to try to find and address more warnings if that's okay?
anntzer commentedon May 9, 2018
go for it!
hsl-code commentedon May 10, 2018
Have found some more calls and set stacklevels to 2. There are more though.
hershen commentedon Oct 29, 2018
This is fixed in #12006. Can this be closed?
jklymak commentedon Oct 29, 2018
Thanks a lot @hershen!
hershen commentedon Oct 29, 2018
You're welcome!