Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/src/developers_guide/contributing_code_formatting.rst
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ linted according to our ``.flake8`` configuration file. Note that,
for each ``.pre-commit-config.yaml`` git hook.

Additionally, you may wish to enable ``black`` for your preferred
`editor/IDE <https://black.readthedocs.io/en/stable/editor_integration.html#editor-integration>`_.
`editor/IDE <https://black.readthedocs.io/en/stable/integrations/editors.html>`_.

With the ``pre-commit`` configured, the output of performing a ``git commit``
will look similar to::
Expand Down
9 changes: 3 additions & 6 deletions lib/iris/coord_categorisation.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ def vectorised_fn(*args):
# Private "helper" function
def _pt_date(coord, time):
"""
Return the date of a time-coordinate point.
Return the datetime of a time-coordinate point.

Args:

Expand All @@ -103,14 +103,11 @@ def _pt_date(coord, time):
value of a coordinate point

Returns:
datetime.date
cftime.datetime
"""
# NOTE: All of the currently defined categorisation functions are
# calendar operations on Time coordinates.
# - All these currently depend on Unit::num2date, which is deprecated (!!)
# - We will want to do better, when we sort out our own Calendars.
# - For now, just make sure these all call through this one function.
return coord.units.num2date(time)
return coord.units.num2date(time, only_use_cftime_datetimes=True)


# --------------------------------------------
Expand Down