Sort surface_distance.py imports with isort - #3715
Open
brendancol wants to merge 2 commits into
Open
Conversation
Alphabetize the cost_distance heap helpers, merge the two separate xrspatial.utils import statements into one, and drop the vertical-hanging-indent wrap in favour of the layout used by cost_distance, proximity, focal and zonal. Import order only; no runtime 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.
Fixes #3710.
Runs isort over
xrspatial/surface_distance.pyso it passes the check the project already configures insetup.cfg(line_length = 100).Categories addressed
Cat 4 (isort) only. Three things change:
from xrspatial.cost_distance import _heap_push, _heap_popis alphabetized to_heap_pop, _heap_push.from xrspatial.utils import ...statements, split by an unrelateddataset_supportimport, become one.xrspatial.utilsblock moves from a vertical-hanging-indent wrap to the grid wrap thatcost_distance.py,proximity.py,focal.pyandzonal.pyalready use.No behaviour change is intended and none is possible here: the same names are imported from the same modules, only the order and the wrapping differ. Nothing was added, removed, or re-exported.
flake8 was already clean on this file (0 violations) and stays clean. Cat 1, 2, 3 and 5 turned up nothing to fix.
Verification
Run on a host with CUDA available, so the cupy and dask+cupy tests in that file ran for real rather than skipping.
Also in this PR
The
.claude/sweep-style-state.csvrow forsurface_distance, including the two LOW findings recorded but deliberately not fixed (the deadheight, widthunpack in_surface_distance_dask, and_precompute_dd_gridreaching intoxrspatial.zonalfor a helper this module already defines). Both are described in #3710.