Skip to content

Commit b2fbae7

Browse files
committed
MNT : remove draw_if_interactive from boilerplate
With the repl callback the pyplot function do not need to call `draw_if_interactive`.
1 parent f15c871 commit b2fbae7

File tree

2 files changed

+6
-87
lines changed

2 files changed

+6
-87
lines changed

boilerplate.py

+1-4
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@ def %(func)s(%(argspec)s):
5656
%(ax)s.hold(hold)
5757
try:
5858
%(ret)s = %(ax)s.%(func)s(%(call)s)
59-
draw_if_interactive()
6059
finally:
6160
%(ax)s.hold(%(washold)s)
6261
%(mappable)s
@@ -69,7 +68,6 @@ def %(func)s(%(argspec)s):
6968
@docstring.copy_dedent(Axes.%(func)s)
7069
def %(func)s(%(argspec)s):
7170
%(ret)s = gca().%(func)s(%(call)s)
72-
draw_if_interactive()
7371
return %(ret)s
7472
"""
7573

@@ -85,7 +83,6 @@ def {name}():
8583
8684
if im is not None:
8785
im.set_cmap(cm.{name})
88-
draw_if_interactive()
8986
9087
"""
9188

@@ -274,7 +271,7 @@ def format_value(value):
274271

275272
# Since we can't avoid using some function names,
276273
# bail out if they are used as argument names
277-
for reserved in ('gca', 'gci', 'draw_if_interactive'):
274+
for reserved in ('gca', 'gci'):
278275
if reserved in bad:
279276
msg = 'Axes method %s has kwarg named %s' % (func, reserved)
280277
raise ValueError(msg)

0 commit comments

Comments
 (0)