Skip to content

Commit

Permalink
Add some typing
Browse files Browse the repository at this point in the history
  • Loading branch information
dcherian committed Jul 28, 2020
1 parent c8ef7aa commit 60ab819
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions cf_xarray/accessor.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,9 @@ def _get_axis_coord_single(var: Union[DataArray, Dataset], key: str,) -> List[st
return results


def _get_axis_coord_time_accessor(var, key):
def _get_axis_coord_time_accessor(
var: Union[DataArray, Dataset], key: str
) -> List[str]:
"""
Helper method for when our key name is of the nature "T.month" and we want to
isolate the "T" for coordinate mapping
Expand All @@ -191,7 +193,7 @@ def _get_axis_coord_time_accessor(var, key):
----------
var: DataArray, Dataset
DataArray belonging to the coordinate to be checked
key: str, ["X", "Y", "Z", "T", "longitude", "latitude", "vertical", "time"]
key: str, [e.g. "T.month"]
key to check for.
Returns
Expand All @@ -212,7 +214,7 @@ def _get_axis_coord_time_accessor(var, key):
return []


def _get_axis_coord(var: Union[DataArray, Dataset], key: str,) -> List[str]:
def _get_axis_coord(var: Union[DataArray, Dataset], key: str) -> List[str]:
"""
Translate from axis or coord name to variable name
Expand Down

0 comments on commit 60ab819

Please sign in to comment.