esheldon / fitsio

A python package for FITS input/output wrapping cfitsio
GNU General Public License v2.0
133 stars 57 forks source link

move to ruff for linter in order to help flag numpy2 issues #392

Closed beckermr closed 3 months ago

beckermr commented 4 months ago

Apparently ruff has an integration / mode to help flag numpy 2 conversion issues. This seems useful enough to consider dropping flake8 for ruff.

esheldon commented 3 months ago

I ran ruff and this was the only issue:

fitsio/util.py:45:17: NPY201 [*] `np.string_` will be removed in NumPy 2.0. Use `numpy.bytes_` instead.
Found 1 error.
[*] 1 fixable with the `--fix` option.

This is dealt with by checking the numpy version, so I think we are OK