PyBaMM icon indicating copy to clipboard operation
PyBaMM copied to clipboard

Set `strict=True` in the `zip()` calls

Open Saransh-cpp opened this issue 6 months ago • 1 comments

It would be nice to set strict=True in all zips (in another PR by someone else) to avoid silent bugs.

Originally posted by @Saransh-cpp in https://github.com/pybamm-team/PyBaMM/pull/5052#pullrequestreview-2931361136

Saransh-cpp avatar Jun 16 '25 09:06 Saransh-cpp

The strict=False was added automatically by ruff and there is no guarantee that the tests will catch all errors from the automatic changes.

In the same PR it did not catch an indexing error from an automatic switch from zip(a[1:-1], a[2:]) to itertools.pairwise(a)

kratman avatar Jun 16 '25 13:06 kratman