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

Skip to content

Commit ff67bfb

Browse files
committed
Fix deprecation check in wx Timer.
Otherwise, breaks e.g. examples/animation/strip_chart.py and likely most of the animation framework, which calls Timer() with no arguments.
1 parent 248399e commit ff67bfb

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)