Skip to content

Align functools.reduce() docstring with PEP-257 #126045

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

Merged
merged 5 commits into from
Oct 29, 2024

Conversation

skirpichev
Copy link
Member

PEP 257 says that "Multi-line docstrings consist of a summary line just like a one-line docstring, followed by a blank line, followed by a more elaborate description." This is also a requirement from the Argument Clinic.

PEP 257 says that "Multi-line docstrings consist of a summary line just
like a one-line docstring, followed by a blank line, followed by a more
elaborate description."  This is also a requirement from the Argument
Clinic.
@skirpichev
Copy link
Member Author

docstring changes from #125999

Copy link
Contributor

@erlend-aasland erlend-aasland left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for making this a separate change, Sergey.

@erlend-aasland erlend-aasland changed the title Improve functools.reduce() docstring Align functools.reduce() docstring with PEP-257 Oct 27, 2024
@erlend-aasland erlend-aasland added needs backport to 3.12 only security fixes needs backport to 3.13 bugs and security fixes labels Oct 27, 2024
Copy link
Member

@ZeroIntensity ZeroIntensity left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Spaces around operators :)

@erlend-aasland
Copy link
Contributor

Spaces around operators :)

Actually in this case, I think we should keep the exiting formatting. Note that spaces around operators is no strict PEP-8 requirement; you may omit them for readability.

@ZeroIntensity
Copy link
Member

Note that spaces around operators is no strict PEP-8 requirement

I could have sworn it was. TIL!

@rhettinger rhettinger removed their request for review October 28, 2024 01:45
skirpichev and others added 2 commits October 28, 2024 07:26
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com>
@erlend-aasland erlend-aasland enabled auto-merge (squash) October 29, 2024 07:44
@erlend-aasland erlend-aasland merged commit 9b14083 into python:main Oct 29, 2024
37 checks passed
@miss-islington-app

This comment was marked as outdated.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Oct 29, 2024
Yak-shave in preparation for Argument Clinic adaption in pythongh-125999.
(cherry picked from commit 9b14083)

Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Oct 29, 2024
Yak-shave in preparation for Argument Clinic adaption in pythongh-125999.
(cherry picked from commit 9b14083)

Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
@bedevere-app
Copy link

bedevere-app bot commented Oct 29, 2024

GH-126113 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.13 bugs and security fixes label Oct 29, 2024
@bedevere-app
Copy link

bedevere-app bot commented Oct 29, 2024

GH-126114 is a backport of this pull request to the 3.12 branch.

@bedevere-app bedevere-app bot removed the needs backport to 3.12 only security fixes label Oct 29, 2024
@skirpichev skirpichev deleted the reduce-docstring branch October 29, 2024 08:11
erlend-aasland pushed a commit that referenced this pull request Oct 29, 2024
…126113)

Yak-shave in preparation for Argument Clinic adaption in gh-125999.

(cherry picked from commit 9b14083)

Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
erlend-aasland pushed a commit that referenced this pull request Oct 29, 2024
…126114)

Yak-shave in preparation for Argument Clinic adaption in gh-125999.

(cherry picked from commit 9b14083)

Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
picnixz pushed a commit to picnixz/cpython that referenced this pull request Dec 8, 2024
Yak-shave in preparation for Argument Clinic adaption in pythongh-125999.
ebonnal pushed a commit to ebonnal/cpython that referenced this pull request Jan 12, 2025
Yak-shave in preparation for Argument Clinic adaption in pythongh-125999.
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.

4 participants