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

Skip to content

Commit f030a8c

Browse files
committed
Fix pep8 in test_preprocess_data.
1 parent 7f0ea4a commit f030a8c

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

lib/matplotlib/tests/test_preprocess_data.py

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def plot_func(ax, x, y, ls="x", label=None, w="xyz"):
2121

2222

2323
@_preprocess_data(replace_names=["x", "y"], label_namer="y",
24-
positional_parameter_names=["x", "y", "ls", "label", "w"])
24+
positional_parameter_names=["x", "y", "ls", "label", "w"])
2525
def plot_func_varags(ax, *args, **kwargs):
2626
all_args = [None, None, "x", None, "xyz"]
2727
for i, v in enumerate(args):
@@ -287,18 +287,17 @@ def funcy(ax, *args, **kwargs):
287287
list(x), list(y), ls, w, label)
288288

289289
func = _preprocess_data(replace_all_args=True, replace_names=["w"],
290-
label_namer="y")(funcy)
290+
label_namer="y")(funcy)
291291

292292
assert (func(None, "a", "b", w="x", label="", data=data) ==
293293
"x: [1, 2], y: [8, 9], ls: x, w: xyz, label: ")
294294
assert (func(None, "a", "b", w="x", label="text", data=data) ==
295295
"x: [1, 2], y: [8, 9], ls: x, w: xyz, label: text")
296296

297297
func2 = _preprocess_data(replace_all_args=True, replace_names=["w"],
298-
label_namer="y",
299-
positional_parameter_names=["x", "y", "ls",
300-
"label", "w"])(
301-
funcy)
298+
label_namer="y",
299+
positional_parameter_names=["x", "y", "ls",
300+
"label", "w"])(funcy)
302301

303302
assert (func2(None, "a", "b", w="x", data=data) ==
304303
"x: [1, 2], y: [8, 9], ls: x, w: xyz, label: b")
@@ -364,7 +363,7 @@ def test_positional_parameter_names_as_function():
364363
from matplotlib.axes._axes import _plot_args_replacer
365364

366365
@_preprocess_data(replace_names=["x", "y"],
367-
positional_parameter_names=_plot_args_replacer)
366+
positional_parameter_names=_plot_args_replacer)
368367
def funcy(ax, *args, **kwargs):
369368
return "{args} | {kwargs}".format(args=args, kwargs=kwargs)
370369

0 commit comments

Comments
 (0)