A style sweep over xrspatial/viewshed.py turned up three issues, all reported by the project's own tooling (flake8 max-line-length=100, isort line_length=100) or by grep.
First, a shadowed id builtin: lines 1409 and 1474 do id = _pop(idle) and pass id into _insert_into_tree. That local shadows the id builtin. The value lands in the callee's node_id parameter, so renaming the local to node_id drops the shadow and matches the signature. It isn't used anywhere else.
Second, E127 over-indented continuation lines at 2013 and 2014, in the _viewshed_distance_sweep signature.
Third, the .utils import block isn't wrapped at line_length=100; isort --check-only --diff reports the fix.
After the fix, flake8 xrspatial/viewshed.py should report nothing and isort --check-only --diff xrspatial/viewshed.py should be clean. None of this changes runtime behavior, the id rename is just a local variable rename.
A style sweep over
xrspatial/viewshed.pyturned up three issues, all reported by the project's own tooling (flake8max-line-length=100, isortline_length=100) or by grep.First, a shadowed
idbuiltin: lines 1409 and 1474 doid = _pop(idle)and passidinto_insert_into_tree. That local shadows theidbuiltin. The value lands in the callee'snode_idparameter, so renaming the local tonode_iddrops the shadow and matches the signature. It isn't used anywhere else.Second, E127 over-indented continuation lines at 2013 and 2014, in the
_viewshed_distance_sweepsignature.Third, the
.utilsimport block isn't wrapped atline_length=100;isort --check-only --diffreports the fix.After the fix,
flake8 xrspatial/viewshed.pyshould report nothing andisort --check-only --diff xrspatial/viewshed.pyshould be clean. None of this changes runtime behavior, theidrename is just a local variable rename.