Motivation
PR #789 (fixing #785) found the same bug — an exception constructed but never raised, silently falling through an error path — at five independent sites across the codebase (psfex_interp_runner.py, mccd_interp_runner.py ×2, mask_package/mask.py, pipeline/file_handler.py, pipeline/file_io.py). Ruff's PLW0133 (useless-exception-statement) flags exactly this pattern; a linter in CI would have caught all five at introduction time.
Proposal
- Add
ruff to the dev tooling with a conservative initial rule set (e.g. E, F, PLW0133 and friends) — start narrow, expand as the codebase is cleaned.
- Wire it into CI so new violations block, without requiring a big-bang cleanup of existing code (per-file ignores or
--diff-scoped enforcement).
Sibling precedent: sp_validation has a project-wide ruff pass planned (CosmoStat/sp_validation#204).
— Claude (Fable) on behalf of Cail
Motivation
PR #789 (fixing #785) found the same bug — an exception constructed but never raised, silently falling through an error path — at five independent sites across the codebase (
psfex_interp_runner.py,mccd_interp_runner.py×2,mask_package/mask.py,pipeline/file_handler.py,pipeline/file_io.py). Ruff'sPLW0133(useless-exception-statement) flags exactly this pattern; a linter in CI would have caught all five at introduction time.Proposal
ruffto the dev tooling with a conservative initial rule set (e.g.E,F,PLW0133and friends) — start narrow, expand as the codebase is cleaned.--diff-scoped enforcement).Sibling precedent: sp_validation has a project-wide ruff pass planned (CosmoStat/sp_validation#204).
— Claude (Fable) on behalf of Cail