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

Skip to content

Commit 9ce6fbb

Browse files
authored
Merge pull request #12023 from anntzer/wxtimer
Fix deprecation check in wx Timer.
2 parents aac2b2a + ff67bfb commit 9ce6fbb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/matplotlib/backends/backend_wx.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ class TimerWx(TimerBase):
121121
'''
122122

123123
def __init__(self, *args, **kwargs):
124-
if isinstance(args[0], wx.EvtHandler):
124+
if args and isinstance(args[0], wx.EvtHandler):
125125
cbook.warn_deprecated(
126126
"3.0", "Passing a wx.EvtHandler as first argument to the "
127127
"TimerWx constructor is deprecated since %(version)s.")

0 commit comments

Comments
 (0)