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

Skip to content

Commit 8aa800b

Browse files
committed
PEP8: line wrapping, spacing
1 parent 52d23c9 commit 8aa800b

File tree

3 files changed

+12
-10
lines changed

3 files changed

+12
-10
lines changed

lib/matplotlib/__init__.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1646,9 +1646,9 @@ def param(func):
16461646
# arguments
16471647
label_pos = 9999 # bigger than all "possible" argument lists
16481648
label_namer_pos = 9999 # bigger than all "possible" argument lists
1649-
if (label_namer # we actually want a label here ...
1650-
and arg_names # and we can determine a label in *args ...
1651-
and (label_namer in arg_names)): # and it is in *args
1649+
if (label_namer # we actually want a label here ...
1650+
and arg_names # and we can determine a label in *args ...
1651+
and (label_namer in arg_names)): # and it is in *args
16521652
label_namer_pos = arg_names.index(label_namer)
16531653
if "label" in arg_names:
16541654
label_pos = arg_names.index("label")
@@ -1688,9 +1688,9 @@ def inner(ax, *args, **kwargs):
16881688
# update the information about replace names and
16891689
# label position
16901690
_arg_names = positional_parameter_names(args, data)
1691-
if (label_namer # we actually want a label here ...
1692-
and _arg_names # and we can find a label in *args ...
1693-
and (label_namer in _arg_names)): # and it is in *args
1691+
if (label_namer # we actually want a label here ...
1692+
and _arg_names # and we can find a label in *args ...
1693+
and (label_namer in _arg_names)): # and it is in *args
16941694
_label_namer_pos = _arg_names.index(label_namer)
16951695
if "label" in _arg_names:
16961696
_label_pos = arg_names.index("label")

lib/matplotlib/axes/_axes.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1252,7 +1252,8 @@ def _plot_args_replacer(self, args, data):
12521252
if len(remaining) == 1:
12531253
import warnings
12541254

1255-
msg = "Missing argument: this can happen if a color spec ('c') is in data"
1255+
msg = "Missing argument: this can happen if a color spec " \
1256+
"('c') is in data"
12561257
warnings.warn(msg, RuntimeWarning, stacklevel=3)
12571258
_replacer += ["x"]
12581259
elif len(remaining) == 2:

lib/matplotlib/tests/test_labeled_data_unpacking.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -449,23 +449,24 @@ def funcy(ax, x, y, z, bar=None):
449449
pass
450450

451451
assert_regex(funcy.__doc__,
452-
r".*All arguments with the following names: 'x', 'bar'\.")
452+
r".*All arguments with the following names: 'x', 'bar'\.")
453453
assert_not_regex(funcy.__doc__,
454454
r".*All positional and all keyword arguments\.")
455455
assert_not_regex(funcy.__doc__, r".*All positional arguments\.")
456456

457457

458458
def test_positional_parameter_names_as_function():
459459
#
460-
# this is a replace for plot, which can take args as x,y,c,x,y,c or x,y,x,y,c,x,y
460+
# this is a replace for plot, which can take args as
461+
# x,y,c,x,y,c or x,y,x,y,c,x,y
461462
def replacer(args, data):
462463
_replacer = []
463464
remaining = args
464465
while 1:
465466
if len(remaining) == 1:
466467
import warnings
467468

468-
msg = "Missing argument: this can happen if a color spec ('c') is in data"
469+
msg = "Missing argument: color spec ('c=..') is in data?"
469470
warnings.warn(msg, RuntimeWarning, stacklevel=3)
470471
_replacer += ["x"]
471472
elif len(remaining) == 2:

0 commit comments

Comments
 (0)