zonal: fix flake8 F401, E501 + isort drift#2524
Merged
Merged
Conversation
- Cat 3 (F401): drop unused not_implemented_func import. - Cat 1 (E501): wrap dd.concat one-liner at line 455. - Cat 4 (isort): consolidate xrspatial.utils import block. No behavioural change. flake8 and isort clean. All 125 zonal tests pass locally. Closes #2522
brendancol
commented
May 27, 2026
Contributor
Author
brendancol
left a comment
There was a problem hiding this comment.
PR Review: zonal: fix flake8 F401, E501 + isort drift
Blockers
None.
Suggestions
None.
Nits
None.
What looks good
- Diff matches the three findings in issue #2522: one F401, one E501, one isort consolidation. No drive-by edits.
not_implemented_funcis unused. Grep across the file finds zero call sites, and grep acrossxrspatial/finds no re-export consumer (__init__.pyandaccessor.pyimport specific functions fromxrspatial.zonal, none of themnot_implemented_func).- The
dd.concatwrap preserves call semantics: same positional list, sameaxis=1, ignore_unknown_divisions=Truekwargs. - The retained import block keeps all 9 names used elsewhere in the module (43 references across the file).
flake8 xrspatial/zonal.pyandisort --check-only xrspatial/zonal.pyboth pass on the PR head.- 125 zonal tests pass locally on the PR head.
Checklist
- Algorithm matches reference/paper (N/A, no algorithm change)
- All implemented backends produce consistent results (N/A, no dispatch change)
- NaN handling is correct (N/A)
- Edge cases are covered by tests (N/A, existing tests cover behaviour)
- Dask chunk boundaries handled correctly (N/A)
- No premature materialization or unnecessary copies (N/A)
- Benchmark exists or is not needed (N/A, pure style)
- README feature matrix updated (N/A, no API change)
- Docstrings present and accurate (N/A)
Contributor
Author
PR ReviewBlockersNone. SuggestionsNone. NitsNone. What looks good
Checklist
Ready to merge. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #2522.
Summary
not_implemented_funcimport (F401, Cat 3).dd.concatone-liner at line 455 (E501, Cat 1).xrspatial.utilsimport block — merge the trailinghas_dask_array, alphabetise, trim the extra blank line above# 3rd-party(Cat 4, isort).No behavioural change.
not_implemented_funcwas only on the importline; there are no call sites.
Test plan
flake8 xrspatial/zonal.pycleanisort --check-only xrspatial/zonal.pycleanpytest xrspatial/tests/test_zonal.py -x— 125 passed