Style: drop dead code + fix import ordering in fire.py#3397
Merged
Conversation
- Remove unused 'log' from math import (F401) - Remove unused S_T local in _rothermel_fuel_constants (F841) - isort reorder of xrspatial.utils import block (Cat 4) No behavioural change. flake8 + isort now clean on fire.py; 54 fire tests still pass. Update sweep-style-state.csv.
brendancol
commented
Jun 19, 2026
brendancol
left a comment
Contributor
Author
There was a problem hiding this comment.
Domain-aware review (style sweep, fire.py)
Scope: 3-line dead-code/import cleanup plus a sweep-state CSV row. Verified the diff matches the stated intent.
Blockers: none.
Suggestions: none.
Nits: none.
Checks I ran:
logis gone from the import and has no remaining call sites in the module.S_Tlocal is removed; the only survivingS_Tis in the ANDERSON_13 column-layout comment (line 47), which is correct to keep since the table column itself is unchanged.S_e/rho_p(the adjacent locals) are still read by the Rothermel math, so the deletion is surgical.- isort reflow of the
xrspatial.utilsblock is a pure reordering; the imported names are identical before and after. - flake8 and isort are both clean on the file;
pytest xrspatial/tests/test_fire.pyis 54 passed. No runtime logic touched, so backend parity (numpy/cupy/dask) is unaffected by construction.
No behavioural change. Good to merge once CI is green.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #3395.
Style sweep on
xrspatial/fire.py. The project's flake8 and isort configs (setup.cfg) flag dead code that nothing in CI checks for.What changed:
logfrom the math import (flake8 F401)S_Tlocal in_rothermel_fuel_constants(flake8 F841);S_eandrho_pnext to it are still used, and theANDERSON_13table column + its comment are untouchedxrspatial.utilsimport block to the grid layout (Cat 4)Categories addressed: Cat 3 (F401, F841), Cat 4 (isort). No Cat 1/2/5 findings.
No behavioural change. Removing the
logimport andS_Tlocal touches no runtime logic, so all four backends (numpy, cupy, dask+numpy, dask+cupy) are unaffected.Test plan:
flake8 xrspatial/fire.pyis cleanisort --check-only xrspatial/fire.pyis cleanpytest xrspatial/tests/test_fire.py: 54 passed