-
Notifications
You must be signed in to change notification settings - Fork 446
Open
Labels
Area: InfrastructurePertains to project infrastructure (e.g. CI, linting)Pertains to project infrastructure (e.g. CI, linting)Type: EnhancementEnhancement to existing functionalityEnhancement to existing functionality
Description
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 aTrue
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Area: InfrastructurePertains to project infrastructure (e.g. CI, linting)Pertains to project infrastructure (e.g. CI, linting)Type: EnhancementEnhancement to existing functionalityEnhancement to existing functionality