Skip to content

Commit 6a7844e

Browse files
Enforce ruff/Pylint Warnings (PLW) (#10458)
1 parent 7a654ad commit 6a7844e

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

pyproject.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,7 @@ extend-select = [
261261
"W", # pycodestyle warnings
262262
"PGH", # pygrep-hooks
263263
"PLE", # Pylint Errors
264+
"PLW", # Pylint Warnings
264265
"UP", # pyupgrade
265266
"FURB", # refurb
266267
"RUF",
@@ -276,6 +277,10 @@ ignore = [
276277
"PERF203", # try-except within a loop incurs performance overhead
277278
"E402", # module level import not at top of file
278279
"E731", # do not assign a lambda expression, use a def
280+
"PLW0603", # using the global statement to update is discouraged
281+
"PLW0642", # reassigned `self` variable in instance method
282+
"PLW1641", # object does not implement `__hash__` method
283+
"PLW2901", # `for` loop variable overwritten by assignment target
279284
"UP007", # use X | Y for type annotations
280285
"FURB105", # unnecessary empty string passed to `print`
281286
"RUF001", # string contains ambiguous unicode character

xarray/backends/chunks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def align_nd_chunks(
5151

5252
# The ideal size of the chunks is the maximum of the two; this would avoid
5353
# that we use more memory than expected
54-
max_chunk = max(fixed_chunk, max(var_chunks))
54+
max_chunk = max(fixed_chunk, *var_chunks)
5555

5656
# The algorithm assumes that the chunks on this array are aligned except the last one
5757
# because it can be considered a partial one

0 commit comments

Comments
 (0)