Skip to content

resample: fix isort drift in import ordering#2545

Merged
brendancol merged 1 commit into
mainfrom
deep-sweep-style-resample-2026-05-27
May 28, 2026
Merged

resample: fix isort drift in import ordering#2545
brendancol merged 1 commit into
mainfrom
deep-sweep-style-resample-2026-05-27

Conversation

@brendancol

Copy link
Copy Markdown
Contributor

Closes #2543.

Summary

Mechanical isort fix only. flake8 and Cat 5 grep (bare except, mutable defaults, == None, shadowed builtins) are clean. The only style finding flagged by the style sweep against xrspatial/resample.py is import-ordering drift against the project's configured line_length=100 in setup.cfg.

Categories addressed

  • Cat 4 (isort) -- MEDIUM

No Cat 1 (E-codes), Cat 2 (W-codes), Cat 3 (F-codes), or Cat 5 (bug-prone patterns).

Diff shape

  • Top-of-file scipy.ndimage: parenthesised multi-line -> one-per-line.
  • Top-of-file xrspatial.utils: collapsed to a single line; xrspatial.dataset_support reordered to come first.
  • Local cupyx.scipy.ndimage imports inside _nan_aware_interp_cupy and _interp_block_cupy: parenthesised multi-line -> one-per-line.
  • Blank line normalised after import math inside _run_dask_numpy and _run_dask_cupy.

No behavioural change is intended; no public API touched.

Verification

  • flake8 xrspatial/resample.py -- clean
  • isort --check-only xrspatial/resample.py -- clean
  • pytest xrspatial/tests/test_resample.py -- 169 passed

Test plan

  • flake8 clean against the configured setup.cfg
  • isort clean against the configured setup.cfg
  • pytest xrspatial/tests/test_resample.py -- 169 passed

Mechanical isort fix only. flake8 and Cat 5 grep are clean; the only
style finding for resample is import-ordering drift against the
project's configured `line_length=100`.

Changes:
- Top-of-file `scipy.ndimage` imports: parenthesised multi-line ->
  one-per-line.
- Top-of-file `xrspatial.utils` imports: collapsed to single line and
  reordered relative to `xrspatial.dataset_support`.
- Local `cupyx.scipy.ndimage` imports inside `_nan_aware_interp_cupy`
  and `_interp_block_cupy`: parenthesised multi-line -> one-per-line.
- Blank line after `import math` inside `_run_dask_numpy` and
  `_run_dask_cupy`.

No behavioural change. 169 resample tests pass.

Categories: Cat 4 (isort) -- MEDIUM.
@github-actions github-actions Bot added the performance PR touches performance-sensitive code label May 28, 2026
@brendancol brendancol merged commit 233ed5d into main May 28, 2026
9 checks passed
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.

resample: fix isort drift in import ordering

1 participant