Skip to content

Style: clean up dasymetric.py lint (F401, E128, isort)#3411

Open
brendancol wants to merge 2 commits into
xarray-contrib:mainfrom
brendancol:deep-sweep-style-dasymetric-2026-06-20
Open

Style: clean up dasymetric.py lint (F401, E128, isort)#3411
brendancol wants to merge 2 commits into
xarray-contrib:mainfrom
brendancol:deep-sweep-style-dasymetric-2026-06-20

Conversation

@brendancol

Copy link
Copy Markdown
Contributor

Summary

Style cleanup for xrspatial/dasymetric.py, found by the /deep-sweep style sweep. Three issues, all reported by the project's own setup.cfg-configured linters (flake8 max-line-length=100, isort line_length=100), neither of which is gated in CI.

Categories addressed

  • Cat 3 (F401): removed is_dask_cupy, imported from xrspatial.utils but never used. grep confirms the only occurrence was the import.
  • Cat 1 (E128): fixed a continuation line under-indented by one space in the dask+cupy _disaggregate_dask_numpy call.
  • Cat 4 (isort): reformatted the xrspatial.utils import block to the form isort produces at line_length=100.

Behavior

No behavior change. The F401 removal drops a symbol that was never referenced (not a re-export). flake8 and isort are clean on the file, and all 61 tests in test_dasymetric.py pass.

Remove unused is_dask_cupy import (F401), fix E128 continuation indent
in the dask+cupy disaggregate path, and reformat the xrspatial.utils
import block to isort's line_length=100 form. No behavior change; all
61 tests in test_dasymetric.py pass and flake8 + isort are clean.

Found by the /deep-sweep style sweep.
@github-actions github-actions Bot added the performance PR touches performance-sensitive code label Jun 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

performance PR touches performance-sensitive code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant