Skip to content

Commit 70e9eb8

Browse files
gerrithollJoe Hamman
authored and
Joe Hamman
committed
add missing , and article in error message (#2557)
Add missing , and article in error message when attribute values have the wrong type.
1 parent f547ed0 commit 70e9eb8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

xarray/backends/api.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ def check_name(name):
113113

114114

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

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

0 commit comments

Comments
 (0)