Add more rules to our ruff config. Current ones I'm seeing:
- Pathlib
PTH
- Pytest style
PT
- PyLint
PL
A brief check shows some things I'd want to look into with the first two. Pylint will need to be more judicious, since a brief look seems to show some things I don't care to fix (overwriting loop variables). That said, I also just saw this while writing:
PLW0177 Comparing against a NaN value; use `math.isnan` instead
--> src/metpy/io/gempak.py:2599:12
|
2598 | station['TIME'] = parsed.date_time.time()
2599 | if math.nan in [parsed.altimeter, parsed.elevation, parsed.temperature]:
| ^^^^^^^^
2600 | station['PMSL'] = missing
2601 | else:
|
which is suspicious but somehow isn't a bug, though should be changed anyways:
import math
a = [1, 1.1, math.nan]
math.nan in a
True
Add more rules to our ruff config. Current ones I'm seeing:
PTHPTPLA brief check shows some things I'd want to look into with the first two. Pylint will need to be more judicious, since a brief look seems to show some things I don't care to fix (overwriting loop variables). That said, I also just saw this while writing:
which is suspicious but somehow isn't a bug, though should be changed anyways:
True