The style sweep ran flake8 and isort against xrspatial/morphology.py. The findings are flake8 Cat 3 (F-codes), which the sweep treats as HIGH severity, plus isort ordering drift (Cat 4, MEDIUM). None change behavior.
flake8 (config: max-line-length=100 from setup.cfg):
xrspatial/morphology.py:19:1: F401 xarray as xr imported but unused
xrspatial/morphology.py:35:1: F401 xrspatial.utils.has_cuda_and_cupy imported but unused
xrspatial/morphology.py:35:1: F401 xrspatial.utils.not_implemented_func imported but unused
xrspatial/morphology.py:106:5: F841 local variable size is assigned to but never used
xr is imported but only DataArray is used. DataArray comes in on its own line and the xr. prefix appears nowhere in the file.
has_cuda_and_cupy and not_implemented_func are imported from xrspatial.utils and never referenced.
size in _circle_kernel is computed and never read.
None of these names are re-exported. xrspatial/__init__.py re-exports only the public morph_* functions, and the module is not star-imported anywhere, so removing them is safe.
isort (config: line_length=100) also reports import-ordering drift in the same block.
Fix: drop the three unused imports and the dead local, then run isort to normalize ordering. No runtime behavior change.
The style sweep ran flake8 and isort against
xrspatial/morphology.py. The findings are flake8 Cat 3 (F-codes), which the sweep treats as HIGH severity, plus isort ordering drift (Cat 4, MEDIUM). None change behavior.flake8 (config: max-line-length=100 from setup.cfg):
xris imported but onlyDataArrayis used.DataArraycomes in on its own line and thexr.prefix appears nowhere in the file.has_cuda_and_cupyandnot_implemented_funcare imported fromxrspatial.utilsand never referenced.sizein_circle_kernelis computed and never read.None of these names are re-exported.
xrspatial/__init__.pyre-exports only the publicmorph_*functions, and the module is not star-imported anywhere, so removing them is safe.isort (config: line_length=100) also reports import-ordering drift in the same block.
Fix: drop the three unused imports and the dead local, then run isort to normalize ordering. No runtime behavior change.