Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add sphinx documentation style to pydocstyle config #6606

Open
Eutropios opened this issue Aug 16, 2023 · 8 comments
Open

Add sphinx documentation style to pydocstyle config #6606

Eutropios opened this issue Aug 16, 2023 · 8 comments
Labels
docstring Related to docstring linting or formatting

Comments

@Eutropios
Copy link
Contributor

Eutropios commented Aug 16, 2023

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 charliermarsh added the docstring Related to docstring linting or formatting label Aug 16, 2023
@charliermarsh
Copy link
Member

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

@charliermarsh charliermarsh added the needs-decision Awaiting a decision from a maintainer label Aug 16, 2023
@Eutropios
Copy link
Contributor Author

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
Copy link

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

@charliermarsh charliermarsh removed the needs-decision Awaiting a decision from a maintainer label Nov 22, 2023
@charliermarsh
Copy link
Member

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

@Eutropios
Copy link
Contributor Author

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

@winwinashwin
Copy link

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

@DanPaseltiner
Copy link

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
Copy link

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

BTW thanks for making this super awesome tool!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docstring Related to docstring linting or formatting
Projects
None yet
Development

No branches or pull requests

6 participants