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

Fix minor docstring issues in dataclasses.py #93024

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

romanngg
Copy link

@romanngg romanngg commented May 20, 2022

Fix minor docstring issues in dataclasses.py.

Otherwise, when using functools.wrap around them (and inherit their docstrings), sphinx renders the docstrings badly and raises warnings about wrong indent.

Otherwise, when using `functools.wrap` around them (and inherit their docstrings), sphinx renders the docstrings badly and raises warnings about wrong indent.
@romanngg romanngg requested a review from ericvsmith as a code owner May 20, 2022
@cpython-cla-bot
Copy link

@cpython-cla-bot cpython-cla-bot bot commented May 20, 2022

All commit authors signed the Contributor License Agreement.
CLA signed

@bedevere-bot
Copy link

@bedevere-bot bedevere-bot commented May 20, 2022

Most changes to Python require a NEWS entry.

Please add it using the blurb_it web app or the blurb command-line tool.

@ericvsmith
Copy link
Member

@ericvsmith ericvsmith commented May 21, 2022

I don’t know a lot about sphinx (clearly). Could you walk me through a few steps on how I can verify the previous behavior was wrong, and this PR fixes the issue? Thanks.

@AA-Turner
Copy link
Member

@AA-Turner AA-Turner commented May 21, 2022

@ericvsmith this is more a reStructuredText issue than a Sphinx one -- the double colon marks the start of an (indented) code block, and the other changes seem alright in terms of ensuring that consistency of indentation is correct within the same code-block.

As for testing, perhaps @romangg is using Sphinx's autodoc or something similar, which renders the docstring as reStructuredText?

A

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants