polygonize: fix flake8 F401, E127, and isort drift#2535
Merged
Conversation
Closes #2534. - Drop unused `is_cupy_array` import from `.utils` (F401). The symbol is not referenced anywhere in `polygonize.py` and is not re-exported (module has no `__all__`). - Collapse the now-3-symbol `.utils` import to a single line — within the configured 100-char `line_length`, isort prefers the single-line form, so this also clears the isort diff. - Pull the second argument of the two `overload(...)` calls in `generated_jit` back four columns so the continuation aligns with the opening paren (E127). Style-only. Categories addressed: - Cat 1 (E127): 2 occurrences - Cat 3 (F401): 1 occurrence - Cat 4 (isort): import block reflow Cat 2 clean. Cat 5 grep clean (no bare except, no mutable defaults, no shadowed builtins). No behavioural change. Style-only, applies uniformly across the numpy/cupy/dask backends dispatched via `ArrayTypeFunctionMapping`. Test plan: - flake8 xrspatial/polygonize.py is silent - isort --check-only --diff xrspatial/polygonize.py is silent - pytest xrspatial/tests/test_polygonize*.py -- 237 passed, 13 skipped
Contributor
Author
|
Review pass on the head of this branch — nothing to address. Scope check:
Verified:
Local checks on this branch:
No blockers, suggestions, or nits. No follow-up commit needed. |
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 #2534.
Summary
is_cupy_arrayimport from.utils(F401). The symbol is not referenced anywhere inpolygonize.pyand the module has no__all__, so it was never re-exported either..utilsimport to a single line. At 78 chars it fits within the configured 100-charline_length, so isort prefers the single-line form — same edit closes the isort diff.overload(...)calls ingenerated_jitback four columns so the continuation aligns with the opening paren (E127).Categories addressed
No Cat 2 findings. Cat 5 grep clean (no bare
except, no mutable default args, no shadowed builtins).Backend coverage
Style-only. No behavioural change. The fixes apply uniformly across the numpy / cupy / dask backends dispatched via
ArrayTypeFunctionMapping.Test plan
flake8 xrspatial/polygonize.pyis silentisort --check-only --diff xrspatial/polygonize.pyis silentpytest xrspatial/tests/test_polygonize*.py-- 237 passed, 13 skipped