Skip to content

Commit 6f354e2

Browse files
Apply ruff preview rule RUF046 (pydata#10199)
RUF046 Value being cast to `int` is already an integer
1 parent 5a77a6e commit 6f354e2

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

pyproject.toml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -276,11 +276,10 @@ ignore = [
276276
"RUF001", # string contains ambiguous unicode character
277277
"RUF002", # docstring contains ambiguous acute accent unicode character
278278
"RUF003", # comment contains ambiguous no-break space unicode character
279-
"RUF005", # consider upacking operator instead of concatenation
279+
"RUF005", # consider unpacking operator instead of concatenation
280280
"RUF012", # mutable class attributes
281281
]
282282

283-
284283
[tool.ruff.lint.per-file-ignores]
285284
# don't enforce absolute imports
286285
"asv_bench/**" = ["TID252"]

xarray/core/resample_cftime.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,7 @@ def exact_cftime_datetime_difference(a: CFTimeDatetime, b: CFTimeDatetime):
475475
datetime.timedelta
476476
"""
477477
seconds = b.replace(microsecond=0) - a.replace(microsecond=0)
478-
seconds = int(round(seconds.total_seconds()))
478+
seconds = round(seconds.total_seconds())
479479
microseconds = b.microsecond - a.microsecond
480480
return datetime.timedelta(seconds=seconds, microseconds=microseconds)
481481

0 commit comments

Comments
 (0)