8000 Merge pull request #6304 from jmc734/master · blink1073/matplotlib@6bac790 · GitHub
Skip to content

Commit 6bac790< 10000 /span>

Browse files
committed
Merge pull request matplotlib#6304 from jmc734/master
Updating animation file writer to allow keywork arguments when using `with` construct
2 parents 585d128 + 653e240 commit 6bac790

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/matplotlib/animation.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ class AbstractMovieWriter(six.with_metaclass(abc.ABCMeta)):
137137
'''
138138

139139
@abc.abstractmethod
140-
def setup(self, fig, outfile, dpi, *args):
140+
def setup(self, fig, outfile, dpi):
141141
'''
142142
Perform setup for writing the movie file.
143143
@@ -163,13 +163,13 @@ def finish(self):
163163
'Finish any processing for writing the movie.'
164164

165165
@contextlib.contextmanager
166-
def saving(self, fig, outfile, dpi, *args):
166+
def saving(self, fig, outfile, dpi, *args, **kwargs):
167167
'''
168168
Context manager to facilitate writing the movie file.
169169
170170
All arguments are passed on to `setup`.
171171
'''
172-
self.setup(fig, outfile, dpi, *args)
172+
self.setup(fig, outfile, dpi, *args, **kwargs)
173173
yield
174174
self.finish()
175175

@@ -246,7 +246,7 @@ def frame_size(self):
246246
width_inches, height_inches = self.fig.get_size_inches()
247247
return width_inches * self.dpi, height_inches * self.dpi
248248

249-
def setup(self, fig, outfile, dpi, *args):
249+
def setup(self, fig, outfile, dpi):
250250
'''
251251
Perform setup for writing the movie file.
252252

0 commit comments

Comments
 (0)
0