ruff icon indicating copy to clipboard operation
ruff copied to clipboard

Add sphinx documentation style to pydocstyle config

Open Eutropios opened this issue 2 years ago • 14 comments

Addition of sphinx documentation style to pydocstyle config as so:

[tool.ruff.pydocstyle]
    convention = "sphinx"

Currently pep257, google, and numpy documentation styles are supported. It'd be nice to have this major documentation style added as well.

Eutropios avatar Aug 16 '23 02:08 Eutropios

We can probably add a convention that's compatible, but there would also be necessary work to actually support parsing Sphinx docstrings (e.g., https://github.com/PyCQA/pydocstyle/pull/595). pydocstyle itself does not support this.

charliermarsh avatar Aug 16 '23 03:08 charliermarsh

Alright, so as far as I know, the necessary pull requests to pydocstyle have been made as of 5 hours ago. Relevant commit here: PyCQA/pydocstyle/commit.

Eutropios avatar Sep 22 '23 19:09 Eutropios

Related, it would be nice to get a check when a different convention is used.

LecrisUT avatar Nov 22 '23 18:11 LecrisUT

(Removing needs-decision since we should support this now.)

charliermarsh avatar Nov 22 '23 18:11 charliermarsh

Sounds great! Let me know if there's anything I can do to help.

Eutropios avatar Nov 24 '23 00:11 Eutropios

+1 on this feature. Any updates on sphinx support?

winwinashwin avatar Feb 05 '24 06:02 winwinashwin

Ditto @winwinashwin. We would adopt Ruff immediately on this project it there was sphinx support. Unfortunately, we have a code base full of Sphinx style docstrings and need to implement linting on them.

DanPaseltiner avatar Feb 16 '24 21:02 DanPaseltiner

Hi, just checking if/when this will be available?

BTW thanks for making this super awesome tool!

jaladh-singhal avatar Mar 27 '24 20:03 jaladh-singhal

Hello,

Also wondering if there's any plan updates to this? The project I work for is also looking for the support.

Lassii- avatar Aug 12 '24 08:08 Lassii-