Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit d0ffbfd

Browse filesBrowse files
authored
Merge pull request #11166 from souravsingh/fix-warnings
MNT: Set stacklevel to 2 for backend_wx
2 parents e4ce92f + 71617e2 commit d0ffbfd
Copy full SHA for d0ffbfd

File tree

Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+2
-2
lines changed

‎lib/matplotlib/backends/backend_wx.py

Copy file name to clipboardExpand all lines: lib/matplotlib/backends/backend_wx.py
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1555,7 +1555,7 @@ def save_figure(self, *args):
15551555
warnings.warn(
15561556
'extension %s did not match the selected '
15571557
'image type %s; going with %s' %
1558-
(ext, format, ext), stacklevel=0)
1558+
(ext, format, ext), stacklevel=2)
15591559
format = ext
15601560
try:
15611561
self.canvas.figure.savefig(
@@ -1721,7 +1721,7 @@ def trigger(self, *args):
17211721
warnings.warn(
17221722
'extension %s did not match the selected '
17231723
'image type %s; going with %s' %
1724-
(ext, format, ext), stacklevel=0)
1724+
(ext, format, ext), stacklevel=2)
17251725
format = ext
17261726
if default_dir != "":
17271727
matplotlib.rcParams['savefig.directory'] = dirname

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.