Replace darglint with ruff DOC rules.
Darglint is not maintained anymore, and is very slow.
Alternative to covers the docstring checks:
- pydoclint: Is actively maintained and the rules mostly make sense, but they are not selectable, so it's all or nothing.
- ruff DOC rules: These rules are inspired by
pydoclintbut will give us the flexibility of ruff in selecting the rules we want to apply.- need to track the progress on this issue before we can use this however: https://github.com/astral-sh/ruff/issues/12434
Subset of the rules we need enabled in ruff, before we can remove darglint:
- [ ] DOC101
- [ ] DOC102
- [ ] DOC103
- [ ] DOC104
- [ ] DOC111
- [x] DOC201
- [x] DOC202
- [x] DOC402
- [x] DOC403
- [x] DOC501
- [x] DOC502
Hi @Lendemor , I'm the author of pydoclint. If you use pydoclint in the flake8 mode, you can select which violations you want to include or exclude.
Using pydoclint in the flake8 mode is almost as fast as using it in the native mode.
Hi @jsh9 I gave it a try and it seems to work fine.
Ultimately we'd still want to have those rules enabled in ruff because it make the config easier / reduce the number of tools used.
But for now it seems usable so maybe we will give it a try.