Skip to content

Commit 60ab819

Browse files
committed
Add some typing
1 parent c8ef7aa commit 60ab819

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

cf_xarray/accessor.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,9 @@ def _get_axis_coord_single(var: Union[DataArray, Dataset], key: str,) -> List[st
182182
return results
183183

184184

185-
def _get_axis_coord_time_accessor(var, key):
185+
def _get_axis_coord_time_accessor(
186+
var: Union[DataArray, Dataset], key: str
187+
) -> List[str]:
186188
"""
187189
Helper method for when our key name is of the nature "T.month" and we want to
188190
isolate the "T" for coordinate mapping
@@ -191,7 +193,7 @@ def _get_axis_coord_time_accessor(var, key):
191193
----------
192194
var: DataArray, Dataset
193195
DataArray belonging to the coordinate to be checked
194-
key: str, ["X", "Y", "Z", "T", "longitude", "latitude", "vertical", "time"]
196+
key: str, [e.g. "T.month"]
195197
key to check for.
196198
197199
Returns
@@ -212,7 +214,7 @@ def _get_axis_coord_time_accessor(var, key):
212214
return []
213215

214216

215-
def _get_axis_coord(var: Union[DataArray, Dataset], key: str,) -> List[str]:
217+
def _get_axis_coord(var: Union[DataArray, Dataset], key: str) -> List[str]:
216218
"""
217219
Translate from axis or coord name to variable name
218220

0 commit comments

Comments
 (0)