xarray icon indicating copy to clipboard operation
xarray copied to clipboard

Add pygrep-hooks and mdformat to pre-commit hooks

Open Armavica opened this issue 1 year ago • 3 comments

Towards #8239. This mainly addresses problems in rst and markdown files.

Armavica avatar Oct 18 '24 13:10 Armavica

Overall looks great!

We should check some of those, I added a couple of comments, though not a complete review.

To the extent that some might interfere with mypy or ruff, etc, that's not good — we don't want to be in a situation where code can't get through both checkers. Are we OK there?

The markdown & rst checkers look overall great!

max-sixty avatar Oct 18 '24 23:10 max-sixty

Why don't we instead try to rely on ruff and enable these rules there? Many seems supported already, rules start with PGH*.

headtr1ck avatar Oct 21 '24 14:10 headtr1ck

Why don't we instead try to rely on ruff and enable these rules there? Many seems supported already, rules start with PGH*.

Definitely preferable for the python ones. (though formatting non-python files would still be part of this sort of effort...)

max-sixty avatar Oct 21 '24 17:10 max-sixty

Thank you for all your comments, I switched to prettier which seems to do a less surprising job in many cases. I also deselected the pygrep-hooks that are already checked by ruff.

Armavica avatar Nov 16 '24 21:11 Armavica