SciTools-incubator / iris-esmf-regrid

A collection of structured and unstructured ESMF regridding schemes for Iris.
BSD 3-Clause "New" or "Revised" License
17 stars 16 forks source link

Raise exceptions instead of using `assert` #366

Open bouweandela opened 3 weeks ago

bouweandela commented 3 weeks ago

There are assert statements in various places, e.g. https://github.com/SciTools-incubator/iris-esmf-regrid/blob/fdd2051dfff050b18c356a2b4277426e74415a61/esmf_regrid/schemes.py#L185-L186

For applications and users of this library, it would be nice to replace those with exceptions with a message explaining the error.

trexfeathers commented 3 weeks ago

assert (S101) - Ruff (astral.sh)