Skip to content

Commit

Permalink
add missing , and article in error message (#2557)
Browse files Browse the repository at this point in the history
Add missing , and article in error message when attribute values have the wrong type.
  • Loading branch information
gerritholl authored and Joe Hamman committed Nov 16, 2018
1 parent f547ed0 commit 70e9eb8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions xarray/backends/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ def check_name(name):


def _validate_attrs(dataset):
"""`attrs` must have a string key and a value which is either: a number
"""`attrs` must have a string key and a value which is either: a number,
a string, an ndarray or a list/tuple of numbers/strings.
"""
def check_attr(name, value):
Expand All @@ -128,8 +128,8 @@ def check_attr(name, value):

if not isinstance(value, (basestring, Number, np.ndarray, np.number,
list, tuple)):
raise TypeError('Invalid value for attr: {} must be a number '
'string, ndarray or a list/tuple of '
raise TypeError('Invalid value for attr: {} must be a number, '
'a string, an ndarray or a list/tuple of '
'numbers/strings for serialization to netCDF '
'files'.format(value))

Expand Down

0 comments on commit 70e9eb8

Please sign in to comment.