DOC: Autoreformat all docstrings.#5122
Conversation
Surprisingly not many changes, most of them are adding leading */** to
args, kwargs which is not clear according to numpydoc but seem like the
thigs to do, plus it's already done in a few other places.
A couple of spaces before `:`, that semantically matter. Numpydoc
improperly parse the types if there is no space before the :,
a documented parameter that does not exist on the function, and
some casing of section names.
There are a couple errors that this was not able to autofix (like
missing blank line before `Returns` section leading Numpydoc to
inpterprete "Returns" as a parameter of the function in
xarray/core/dataset.py:roll extra parameters: {'-------', 'rolled', 'Returns'}
Because we're already bug fans of your work! (#4872). Thank you! I think we're just waiting for it to stabilize before activating the pre-commit hook: xarray/.pre-commit-config.yaml Lines 27 to 31 in 903278a |
keewis
left a comment
There was a problem hiding this comment.
Because we're already bug fans of your work!
😄
I agree, this really is useful. Unfortunately it still seems a bit too unstable, and it is missing a few features (I'll try to open issues for those).
Numpydoc improperly parse the types if there is no space before the
:
we use napoleon which doesn't have that issue but it's still nice to keep the style consistent
Haha indeed.
Yeah, I agree numpydoc could be improved, though at the same time consistent styling is nice. And I'm working on a terminal renderer for IPython that need slightly stricter syntax.
Looking forward to it. |
that looks cool. Do you have a link for that project? |
I just updated the readme a bit and made the repo public. Feedback welcome; though it's in an extremely alpha stage. https://github.com/Carreau/papyri Don't trust any of the current documentation/info right now most things are in my head. |

Surprisingly not many changes, most of them are adding leading /* to
args, kwargs which is not clear according to numpydoc but seem like the
thigs to do, plus it's already done in a few other places.
A couple of spaces before
:, that semantically matter. Numpydocimproperly parse the types if there is no space before the :,
a documented parameter that does not exist on the function, and
some casing of section names.
There are a couple errors that this was not able to autofix (like
missing blank line before
Returnssection leading Numpydoc toinpterprete "Returns" as a parameter of the function in
xarray/core/dataset.py:roll extra parameters: {'-------', 'rolled', 'Returns'}
pre-commit run --all-fileswhats-new.rstapi.rst