Skip to content

Commit 2dae63e

Browse files
committed
Fix typing
1 parent c84212a commit 2dae63e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

xarray/coding/times.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,8 @@ def _cast_timestamp_to_coarsest_resolution(timestamp: pd.Timestamp) -> pd.Timest
306306
for unit in _ORDERED_PANDAS_TIME_RESOLUTIONS:
307307
coarsest_timestamp = timestamp.as_unit(unit)
308308
if coarsest_timestamp == timestamp:
309-
return coarsest_timestamp
309+
break
310+
return coarsest_timestamp
310311

311312

312313
def _unpack_time_unit_and_ref_date(

0 commit comments

Comments
 (0)