Skip to content

Commit 75a7dd1

Browse files
committed
#157 Update docstrings of type hints
1 parent dfbaeb4 commit 75a7dd1

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

xarray_dataclasses/typing.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ def annotates(cls, tp: Any) -> bool:
115115

116116

117117
Attr = Annotated[T, FType.ATTR]
118-
"""Type hint to define attribute fields (``Attr[TAttr]``).
118+
"""Type hint for attribute fields (``Attr[T]``).
119119
120120
Example:
121121
::
@@ -138,7 +138,7 @@ class Image(AsDataArray):
138138
"""
139139

140140
Coord = Annotated[Union[Labeled[TDims], Collection[TDType], TDType], FType.COORD]
141-
"""Type hint to define coordinate fields (``Coord[TDims, TDType]``).
141+
"""Type hint for coordinate fields (``Coord[TDims, TDType]``).
142142
143143
Example:
144144
::
@@ -157,7 +157,7 @@ class Image(AsDataArray):
157157
"""
158158

159159
Coordof = Annotated[Union[TDataClass, Any], FType.COORD]
160-
"""Type hint to define coordinate fields (``Coordof[TDataClass]``).
160+
"""Type hint for coordinate fields (``Coordof[TDataClass]``).
161161
162162
Unlike ``Coord``, it specifies a dataclass that defines a DataArray class.
163163
This is useful when users want to add metadata to dimensions for plotting.
@@ -189,7 +189,7 @@ class Image(AsDataArray):
189189
"""
190190

191191
Data = Annotated[Union[Labeled[TDims], Collection[TDType], TDType], FType.DATA]
192-
"""Type hint to define data fields (``Coordof[TDims, TDType]``).
192+
"""Type hint for data fields (``Coordof[TDims, TDType]``).
193193
194194
Example:
195195
Exactly one data field is allowed in a DataArray class
@@ -210,7 +210,7 @@ class ColorImage(AsDataset):
210210
"""
211211

212212
Dataof = Annotated[Union[TDataClass, Any], FType.DATA]
213-
"""Type hint to define data fields (``Coordof[TDataClass]``).
213+
"""Type hint for data fields (``Coordof[TDataClass]``).
214214
215215
Unlike ``Data``, it specifies a dataclass that defines a DataArray class.
216216
This is useful when users want to reuse a dataclass in a Dataset class.
@@ -237,7 +237,7 @@ class ColorImage(AsDataset):
237237
"""
238238

239239
Name = Annotated[THashable, FType.NAME]
240-
"""Type hint to define name fields (``Name[TName]``).
240+
"""Type hint for name fields (``Name[THashable]``).
241241
242242
Example:
243243
::

0 commit comments

Comments
 (0)