Drop unused math import and fix isort drift in interpolate (#3286)#3287
Merged
Conversation
brendancol
commented
Jun 12, 2026
brendancol
left a comment
Contributor
Author
There was a problem hiding this comment.
PR Review: Drop unused math import and fix isort drift in interpolate (#3286)
Blockers
None.
Suggestions
None.
Nits
None.
What looks good
- The F401 fix is safe.
mathhas no other references in_idw.py(the IDW kernels use plain arithmetic and**), andinterpolate/__init__.pyre-exports onlyidw,kriging, andspline, so the public surface is unchanged. _spline.pykeeps itsmathimport, which is still used (math.login the TPS kernels at lines 120 and 156).- The reflowed
from xrspatial.utils import (...)blocks match what #2916 did to_kriging.py, so the subpackage import style is now consistent.flake8andisort --check-onlyboth pass onxrspatial/interpolate/. - The state CSV row stays on one physical line, is keyed
interpolate, and leaves the olderinterpolate-krigingrow alone.
Checklist
- Algorithm / NaN / dask / GPU checks: not applicable, no executable code changed
- Backend coverage: unchanged; 66 interpolation tests pass (CUDA available)
- Benchmarks, README matrix, docstrings: not applicable for an imports-only change
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 #3286
Style cleanup from the /sweep-style audit of
xrspatial/interpolate:import mathfrom_idw.py. The IDW kernels only do arithmetic;_spline.pykeeps itsmathimport formath.login the TPS kernels.mathis not re-exported (interpolate/__init__.pyexports onlyidw,kriging,spline), so nothing user-facing changes.from xrspatial.utils import (...)block in_idw.pyand_spline.pyfrom one-name-per-line to two lines under the configuredline_length=100._kriging.pygot the same fix in Style: fix flake8 E128 and isort drift in interpolate/_kriging.py #2916; this makes the subpackage consistent.No behavior change. Imports only, no executable code touched. Style fixes apply uniformly across all four backends (numpy / cupy / dask+numpy / dask+cupy).
Test plan:
flake8 xrspatial/interpolate/reports nothingisort --check-only xrspatial/interpolate/passespytest xrspatial/tests/test_interpolation.py— 66 passed (CUDA available)Also updates
.claude/sweep-style-state.csvwith the interpolate row.