astral-sh / ruff

An extremely fast Python linter and code formatter, written in Rust.
https://docs.astral.sh/ruff
MIT License
31.1k stars 1.03k forks source link

Add sphinx documentation style to pydocstyle config #6606

Open Eutropios opened 1 year ago

Eutropios commented 1 year ago

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.

charliermarsh commented 1 year ago

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.

Eutropios commented 12 months ago

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.

LecrisUT commented 10 months ago

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

charliermarsh commented 10 months ago

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

Eutropios commented 10 months ago

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

winwinashwin commented 7 months ago

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

DanPaseltiner commented 7 months ago

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.

jaladh-singhal commented 5 months ago

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

BTW thanks for making this super awesome tool!

Lassii- commented 1 month ago

Hello,

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