Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 021530b

Browse files
committed
default png file extension, no need to raise exception
1 parent 76a2cd4 commit 021530b

1 file changed

Lines changed: 7 additions & 12 deletions

File tree

lib/matplotlib/backend_bases.py

Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3222,6 +3222,13 @@ class ToolContainerBase(object):
32223222
The tools with which this `ToolContainer` wants to communicate.
32233223
"""
32243224

3225+
_icon_extension = '.png'
3226+
"""
3227+
Toocontainer button image format extension
3228+
3229+
**String**: Image extension
3230+
"""
3231+
32253232
def __init__(self, toolmanager):
32263233
self.toolmanager = toolmanager
32273234
self.toolmanager.toolmanager_connect('tool_removed_event',
@@ -3280,18 +3287,6 @@ def _get_image_filename(self, image):
32803287
if os.path.isfile(fname):
32813288
return fname
32823289

3283-
@property
3284-
def _icon_extension(self):
3285-
"""
3286-
Get the button image format extension
3287-
3288-
Returns
3289-
=======
3290-
str: Image extension
3291-
"""
3292-
raise AttributeError
3293-
3294-
32953290
def trigger_tool(self, name):
32963291
"""
32973292
Trigger the tool

0 commit comments

Comments
 (0)