8000 savefig kwarg don't use a mutable type as a default argument · matplotlib/matplotlib@6d585f3 · GitHub
[go: up one dir, main page]

Skip to content
8000

Commit 6d585f3

Browse files
committed
savefig kwarg don't use a mutable type as a default argument
1 parent 63733aa commit 6d585f3

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lib/matplotlib/testing/decorators.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ def do_test():
167167

168168
def image_comparison(baseline_images=None, extensions=None, tol=1e-3,
169169
freetype_version=None, remove_text=False,
170-
savefig_kwarg=dict()):
170+
savefig_kwarg=None):
171171
"""
172172
call signature::
173173
@@ -213,6 +213,10 @@ def image_comparison(baseline_images=None, extensions=None, tol=1e-3,
213213
# default extensions to test
214214
extensions = ['png', 'pdf', 'svg']
215215

216+
if savefig_kwarg is None:
217+
#default no kwargs to savefig
218+
savefig_kwarg = dict()
219+
216220
def compare_images_decorator(func):
217221
# We want to run the setup function (the actual test function
218222
# that generates the figure objects) only once for each type

0 commit comments

Comments
 (0)
0