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

Skip to content

Commit e9f9190

Browse files
tacaswelltimhoffm
authored andcommitted
FIX: remove typo
1 parent 31dbef6 commit e9f9190

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

lib/matplotlib/__init__.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1529,8 +1529,8 @@ def _replacer(data, key):
15291529
following arguments are replaced by **data[<arg>]**:
15301530
15311531
{replaced}
1532-
1533-
Objects passed as **data** must support item access (``data[<arg>]``) and
1532+
1533+
Objects passed as **data** must support item access (``data[<arg>]``) and
15341534
membership test (``<arg> in data``).
15351535
"""
15361536

@@ -1557,7 +1557,7 @@ def _add_data_doc(docstring, replace_names, replace_all_args):
15571557
if docstring is None:
15581558
docstring = ''
15591559
else:
1560-
docstring = dedent(docstring)git
1560+
docstring = dedent(docstring)
15611561
_repl = ""
15621562
if replace_names is None:
15631563
_repl = "* All positional and all keyword arguments."

lib/matplotlib/axes/_axes.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@ def _has_item(data, name):
5151
availability) and with numpy.arrays.
5252
"""
5353
try:
54-
return name in data or name in data.dtype.names
55-
except (AttributeError, TypeError):
56-
return False
54+
return data.dtype.names is not None and name in data.dtype.names
55+
except AttributeError: # not a numpy array
56+
return name in data
5757

5858

5959
def _plot_args_replacer(args, data):

0 commit comments

Comments
 (0)