xrspatial/fire.py has a few dead-code leftovers from a refactor. The project's own linters catch them, but neither flake8 nor isort runs in CI, so the drift sits there unnoticed.
flake8 (setup.cfg, max-line-length=100):
fire.py:20:1 F401 'math.log' imported but unused
fire.py:105:5 F841 local variable 'S_T' assigned but never used
isort (line_length=100):
- The
xrspatial.utils import block uses the one-per-line layout; isort wants the grid layout. One reordering diff.
Both F-code findings are dead code. log is never called in the module. S_T (total mineral content, row[5] of the Anderson-13 table) gets read into a local in _rothermel_fuel_constants and then nothing uses it. The neighbouring S_e and rho_p locals are used; only S_T is dead. The column itself stays in ANDERSON_13 and its documenting comment, so this only drops the unused binding.
Fix: drop log from the math import, delete the S_T local, and let isort reorder the utils import. No behaviour change, and nothing here touches runtime logic so it applies the same across the numpy/cupy/dask paths.
xrspatial/fire.pyhas a few dead-code leftovers from a refactor. The project's own linters catch them, but neither flake8 nor isort runs in CI, so the drift sits there unnoticed.flake8 (setup.cfg, max-line-length=100):
fire.py:20:1 F401'math.log'imported but unusedfire.py:105:5 F841local variable'S_T'assigned but never usedisort (line_length=100):
xrspatial.utilsimport block uses the one-per-line layout; isort wants the grid layout. One reordering diff.Both F-code findings are dead code.
logis never called in the module.S_T(total mineral content,row[5]of the Anderson-13 table) gets read into a local in_rothermel_fuel_constantsand then nothing uses it. The neighbouringS_eandrho_plocals are used; onlyS_Tis dead. The column itself stays inANDERSON_13and its documenting comment, so this only drops the unused binding.Fix: drop
logfrom themathimport, delete theS_Tlocal, and let isort reorder the utils import. No behaviour change, and nothing here touches runtime logic so it applies the same across the numpy/cupy/dask paths.