8000 Merge pull request #20353 from anntzer/preprocess_data_no_in · matplotlib/matplotlib@11258c2 · GitHub
[go: up one dir, main page]

Skip to content

Commit 11258c2

Browse files
authored
Merge pull request #20353 from anntzer/preprocess_data_no_in
Remove incorrect statement about data-kwarg interface.
2 parents a3fbf18 + 3e592d7 commit 11258c2

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

lib/matplotlib/__init__.py

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1281,18 +1281,12 @@ def _add_data_doc(docstring, replace_names):
12811281

12821282
data_doc = ("""\
12831283
If given, all parameters also accept a string ``s``, which is
1284-
interpreted as ``data[s]`` (unless this raises an exception).
1285-
1286-
Objects passed as **data** must support item access (``data[s]``) and
1287-
membership test (``s in data``)."""
1284+
interpreted as ``data[s]`` (unless this raises an exception)."""
12881285
if replace_names is None else f"""\
1289-
If given, the following parameters also accept a string ``s``, which
1290-
is interpreted as ``data[s]`` (unless this raises an exception):
1291-
1292-
{', '.join(map('*{}*'.format, replace_names))}
1286+
If given, the following parameters also accept a string ``s``, which is
1287+
interpreted as ``data[s]`` (unless this raises an exception):
12931288
1294-
Objec 5550 ts passed as **data** must support item access (``data[s]``) and
1295-
membership test (``s in data``).""")
1289+
{', '.join(map('*{}*'.format, replace_names))}""")
12961290
# using string replacement instead of formatting has the advantages
12971291
# 1) simpler indent handling
12981292
# 2) prevent problems with formatting characters '{', '%' in the docstring

0 commit comments

Comments
 (0)
0