Open joelgrus opened 6 years ago
Related to this, is there any reason why a docstring linter such as pydocstyle shouldn't be added to the tests? I don't think pydocstyle would catch these types of errors, in particular, but it would catch a lot of other stuff.
There's a pylint extension that will do this check. We investigated it a while ago, and we ended up dropping it, because it was a bit too aggressive in declaring failure (without obvious error messages), and because it didn't solve the problem of mismatch between the constructor and from_params
(which isn't a problem anymore). I think the consensus is that we'd really like a check that, when we have parameters listed in a docstring, they need to match the arguments to the function, we just haven't found one that works for us. If you know of one, suggestions are welcome.
There are some more ideas here, if someone wants to try to make this actually work.
Closing, as we no longer use numpy style docstrings
Re-opening, as this would be good to have, and there might be a linter that makes sense now that we've switched our docstring style.
here's the raw materials, if I have time I'll put all the pieces together. you'd need to collect all the classes in the library, find the parameters both way, and make sure they're equal. there's probably lots of edge cases.