Skip to content

Style: fix unused import and import ordering in multispectral.py#3432

Merged
brendancol merged 2 commits into
mainfrom
deep-sweep-style-multispectral-2026-06-20
Jun 20, 2026
Merged

Style: fix unused import and import ordering in multispectral.py#3432
brendancol merged 2 commits into
mainfrom
deep-sweep-style-multispectral-2026-06-20

Conversation

@brendancol

Copy link
Copy Markdown
Contributor

Closes #3428

Style cleanup for xrspatial/multispectral.py, surfaced by the style sweep using the project's own setup.cfg flake8 and isort config.

Changes

  • Remove unused not_implemented_func import from xrspatial.utils (flake8 F401, Cat 3). Confirmed unused with no __all__, so it was not a re-export.
  • Reorder the two project imports so dataset_support precedes utils (isort, Cat 4).

Categories addressed: Cat 3 (F401), Cat 4 (isort). Cat 1/2/5 came back clean. No behavioural change is intended.

Backend coverage

Static import-block edits only. They apply uniformly across numpy / cupy / dask+numpy / dask+cupy, so no per-backend verification is needed.

Test plan

  • flake8 xrspatial/multispectral.py clean
  • isort --check-only --diff xrspatial/multispectral.py clean
  • pytest xrspatial/tests/test_multispectral.py (154 passed)
  • Module imports and not_implemented_func is correctly no longer exposed as a module attribute

Remove unused not_implemented_func import (flake8 F401) and reorder
project imports so isort passes (dataset_support before utils). No
behavioural change. Also record the style-sweep state for this module.

@brendancol brendancol left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Review: Style fix for multispectral.py

Pure import-block cleanup. Two edits plus a sweep-state CSV row.

Blockers

None.

Suggestions

None.

Nits

None.

What looks good

  • Dropping not_implemented_func is safe. It had no use in the module and there is no __all__ re-export, so nothing external resolves the name through multispectral.
  • The isort reorder matches exactly what isort --check-only --diff produces. Both flake8 and isort are clean afterward.
  • The full test_multispectral.py suite (154 tests) still passes, which confirms the dropped import was genuinely dead.
  • No runtime code changed, so no numpy/cupy/dask parity check is needed.

Checklist

  • N/A Algorithm matches reference (no algorithm change)
  • N/A Backend parity (no runtime change)
  • N/A NaN handling (no runtime change)
  • OK Existing tests pass (154/154)
  • N/A Dask chunk boundaries (no runtime change)
  • OK No premature materialization (import-only diff)
  • N/A Benchmark (style-only)
  • N/A README matrix (no API change)
  • OK Module still imports cleanly

…ispectral-2026-06-20

# Conflicts:
#	.claude/sweep-style-state.csv
@brendancol brendancol merged commit 6d273d4 into main Jun 20, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Style: unused import and import ordering in multispectral.py

1 participant