Skip to content

Enforce ruff/Pylint Warnings (PLW) #10458

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 28, 2025
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
5 changes: 5 additions & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,7 @@ extend-select = [
"W", # pycodestyle warnings
"PGH", # pygrep-hooks
"PLE", # Pylint Errors
"PLW", # Pylint Warnings
"UP", # pyupgrade
"FURB", # refurb
"RUF",
Expand All @@ -276,6 +277,10 @@ ignore = [
"PERF203", # try-except within a loop incurs performance overhead
"E402", # module level import not at top of file
"E731", # do not assign a lambda expression, use a def
"PLW0603", # using the global statement to update is discouraged
"PLW0642", # reassigned `self` variable in instance method
"PLW1641", # object does not implement `__hash__` method
"PLW2901", # `for` loop variable overwritten by assignment target
"UP007", # use X | Y for type annotations
"FURB105", # unnecessary empty string passed to `print`
"RUF001", # string contains ambiguous unicode character
Expand Down
2 changes: 1 addition & 1 deletion xarray/backends/chunks.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def align_nd_chunks(

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

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