perlin: remove unused import and fix import ordering#3466
Merged
Conversation
Cat 3 (F401) + Cat 4 (isort) style sweep findings. The import was a refactor leftover and is not re-exported (only perlin leaves the module via xrspatial/__init__.py), so there is no behavioural change on any backend. flake8 and isort clean after the fix; 12 perlin tests pass.
brendancol
commented
Jun 23, 2026
brendancol
left a comment
Contributor
Author
There was a problem hiding this comment.
PR Review: perlin: remove unused import and fix import ordering
Import-only style cleanup. I read perlin.py in full and confirmed the
four names kept on the import line are all referenced in the module:
ArrayTypeFunctionMapping and cuda_args in _perlin_cupy / dispatch,
_dask_task_name_kwargs in both dask paths, _validate_raster in perlin().
not_implemented_func had no use anywhere and isn't re-exported, so
dropping it is safe.
Blockers
None.
Suggestions
None.
Nits
None.
What looks good
- flake8 and isort both clean after the change.
- No behavioural change: the removed name was never called, and the
re-wrap is whitespace only. - test_perlin.py passes (12 tests), so the numpy/cupy/dask dispatch
still imports and runs.
Checklist
- No behavioural change (import-only)
- Remaining imports all used
- Removed name not re-exported (only perlin leaves the module)
- flake8 + isort clean
- Existing tests pass
- [n/a] Algorithm / NaN / dask-boundary / benchmark / README -- no logic touched
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.
What
Style sweep cleanup for
xrspatial/perlin.py. Two findings from theproject's own tooling (
setup.cfg), neither gated in CI:not_implemented_funcwas imported fromxrspatial.utilsand never used. It's a refactor leftover. The name isn't re-exported
(only
perlinleaves the module viaxrspatial/__init__.py), sodropping it doesn't touch the public API.
from xrspatial.utils import (...)line now wraps to theconfigured
line_length=100.Backends
No behavioural change. Style fixes are static and apply uniformly across
numpy / cupy / dask+numpy / dask+cupy.
Test plan
flake8 xrspatial/perlin.pycleanisort --check-only --diff xrspatial/perlin.pycleanimport xrspatial.perlinandfrom xrspatial import perlinboth okpytest xrspatial/tests/test_perlin.py-> 12 passed (CUDA available)Note: GitHub issues are disabled on this repo, so there's no linked
issue. State recorded in
.claude/sweep-style-state.csv.