Skip to content

Commit

Permalink
fix docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
kmuehlbauer committed Dec 17, 2024
1 parent 759fb72 commit 2118191
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 9 deletions.
23 changes: 16 additions & 7 deletions xarray/backends/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -549,7 +549,8 @@ def open_dataset(
This keyword may not be supported by all the backends.
decode_times : bool, CFDatetimeCoder or dict-like, optional
If True, decode times encoded in the standard NetCDF datetime format
into datetime objects. Otherwise, use ``CFDatetimeCoder`` or leave them encoded as numbers.
into datetime objects. Otherwise, use ``CFDatetimeCoder`` or leave them
encoded as numbers.
Pass a mapping, e.g. ``{"my_variable": False}``,
to toggle this feature per-variable individually.
This keyword may not be supported by all the backends.
Expand All @@ -573,8 +574,10 @@ def open_dataset(
raise an error. Pass a mapping, e.g. ``{"my_variable": False}``,
to toggle this feature per-variable individually.
This keyword may not be supported by all the backends.
.. deprecated:: 2024.12.0
Please initialize it with ``CFDatetimeCoder`` and ``decode_times`` kwarg.
concat_characters : bool or dict-like, optional
If True, concatenate along the last dimension of character arrays to
form string arrays. Dimensions will only be concatenated over (and
Expand Down Expand Up @@ -792,8 +795,10 @@ def open_dataarray(
represented using ``np.datetime64[ns]`` objects. If False, always
decode times to ``np.datetime64[ns]`` objects; if this is not possible
raise an error. This keyword may not be supported by all the backends.
Usage of 'use_cftime' as kwarg is deprecated. Please initialize it
with CFDatetimeCoder and 'decode_times' kwarg.
.. deprecated:: 2024.12.0
Please initialize it with ``CFDatetimeCoder`` and ``decode_times`` kwarg.
concat_characters : bool, optional
If True, concatenate along the last dimension of character arrays to
form string arrays. Dimensions will only be concatenated over (and
Expand Down Expand Up @@ -1003,8 +1008,10 @@ def open_datatree(
raise an error. Pass a mapping, e.g. ``{"my_variable": False}``,
to toggle this feature per-variable individually.
This keyword may not be supported by all the backends.
Usage of 'use_cftime' as kwarg is deprecated. Please initialize it
with CFDatetimeCoder and 'decode_times' kwarg.
.. deprecated:: 2024.12.0
Please initialize it with ``CFDatetimeCoder`` and ``decode_times`` kwarg.
concat_characters : bool or dict-like, optional
If True, concatenate along the last dimension of character arrays to
form string arrays. Dimensions will only be concatenated over (and
Expand Down Expand Up @@ -1227,8 +1234,10 @@ def open_groups(
raise an error. Pass a mapping, e.g. ``{"my_variable": False}``,
to toggle this feature per-variable individually.
This keyword may not be supported by all the backends.
Usage of 'use_cftime' as kwarg is deprecated. Please initialize it
with CFDatetimeCoder and 'decode_times' kwarg.
.. deprecated:: 2024.12.0
Please initialize it with ``CFDatetimeCoder`` and ``decode_times`` kwarg.
concat_characters : bool or dict-like, optional
If True, concatenate along the last dimension of character arrays to
form string arrays. Dimensions will only be concatenated over (and
Expand Down
5 changes: 3 additions & 2 deletions xarray/conventions.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,9 @@ def decode_cf_variable(
represented using ``np.datetime64[ns]`` objects. If False, always
decode times to ``np.datetime64[ns]`` objects; if this is not possible
raise an error.
Usage of use_cftime as kwarg is deprecated, please initialize it with
CFDatetimeCoder and ``decode_times``.
.. deprecated:: 2024.12.0
Please initialize it with ``CFDatetimeCoder`` and ``decode_times`` kwarg.
Returns
-------
Expand Down

0 comments on commit 2118191

Please sign in to comment.