Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit a98aabe

Browse filesBrowse files
authored
Merge pull request #16611 from meeseeksmachine/auto-backport-of-pr-16585-on-v3.2.x
Backport PR #16585 on branch v3.2.x (Fix _preprocess_data for Py3.9.)
2 parents bebc51a + eb79f6b commit a98aabe
Copy full SHA for a98aabe

File tree

Expand file treeCollapse file tree

1 file changed

+5
-12
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+5
-12
lines changed

‎lib/matplotlib/__init__.py

Copy file name to clipboardExpand all lines: lib/matplotlib/__init__.py
+5-12Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1561,24 +1561,17 @@ def inner(ax, *args, data=None, **kwargs):
15611561
if replace_names is None or k in replace_names:
15621562
bound.arguments[k] = _replacer(data, v)
15631563

1564-
bound.apply_defaults()
1565-
del bound.arguments["data"]
1564+
new_args = bound.args
1565+
new_kwargs = bound.kwargs
15661566

15671567
if needs_label:
15681568
all_kwargs = {**bound.arguments, **bound.kwargs}
15691569
# label_namer will be in all_kwargs as we asserted above that
15701570
# `label_namer is None or label_namer in arg_names`.
1571-
label = _label_from_arg(all_kwargs[label_namer], auto_label)
1572-
if "label" in arg_names:
1573-
bound.arguments["label"] = label
1574-
try:
1575-
bound.arguments.move_to_end(varkwargs_name)
1576-
except KeyError:
1577-
pass
1578-
else:
1579-
bound.arguments.setdefault(varkwargs_name, {})["label"] = label
1571+
new_kwargs["label"] = _label_from_arg(
1572+
all_kwargs[label_namer], auto_label)
15801573

1581-
return func(*bound.args, **bound.kwargs)
1574+
return func(*new_args, **new_kwargs)
15821575

15831576
inner.__doc__ = _add_data_doc(inner.__doc__, replace_names)
15841577
inner.__signature__ = new_sig

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.