Description
flake8 xrspatial/aspect.py (repo setup.cfg, max-line-length=100) reports four violations:
xrspatial/aspect.py:38:1: E305 expected 2 blank lines after class or function definition, found 1
xrspatial/aspect.py:38:1: E402 module level import not at top of file
xrspatial/aspect.py:219:101: E501 line too long (101 > 100 characters)
xrspatial/aspect.py:263:101: E501 line too long (109 > 100 characters)
The E402 and E305 share a cause: the from xrspatial.geodesic import (...) block at line 38 sits below the _geodesic_cuda_dims function (lines 29-36) instead of with the other top-of-file imports.
The two E501 lines are over-long _run_gpu_geodesic_aspect[griddim, blockdim](...) kernel-launch calls.
Proposed fix
- Move the
xrspatial.geodesic import up with the other top-of-file imports. Resolves E402 and E305.
- Wrap the two long kernel-launch lines. Resolves both E501.
No behavioural change. Not applying isort reordering: slope.py and curvature.py use one-import-per-line for xrspatial.utils, and raw isort would collapse that and make aspect inconsistent with them.
Description
flake8 xrspatial/aspect.py(reposetup.cfg, max-line-length=100) reports four violations:The E402 and E305 share a cause: the
from xrspatial.geodesic import (...)block at line 38 sits below the_geodesic_cuda_dimsfunction (lines 29-36) instead of with the other top-of-file imports.The two E501 lines are over-long
_run_gpu_geodesic_aspect[griddim, blockdim](...)kernel-launch calls.Proposed fix
xrspatial.geodesicimport up with the other top-of-file imports. Resolves E402 and E305.No behavioural change. Not applying isort reordering: slope.py and curvature.py use one-import-per-line for
xrspatial.utils, and raw isort would collapse that and make aspect inconsistent with them.