Skip to content

Docs: standardize boolean constants in stdtypes.rst #133325

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 6 commits into from
May 9, 2025

Conversation

Yzi-Li
Copy link
Contributor

@Yzi-Li Yzi-Li commented May 3, 2025

Replaces lowercase true/false with standard boolean values True/False.


📚 Documentation preview 📚: https://cpython-previews--133325.org.readthedocs.build/

@skirpichev
Copy link
Member

@Yzi-Li, please avoid using "Update branch" button, unless you do something meaningful, e.g. fix a merge conflict.

@Yzi-Li
Copy link
Contributor Author

Yzi-Li commented May 3, 2025

Sorry, but I just want to revert the commit.

Copy link
Member

@serhiy-storchaka serhiy-storchaka left a comment

Choose a reason for hiding this comment

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

There are similar cases for is_valid() in Doc/library/string.rst and filter() in Doc/library/logging.rst. Do you mind to fix them too?

@Yzi-Li
Copy link
Contributor Author

Yzi-Li commented May 9, 2025

Do you mind to fix them too?

I'd like to do.

@Yzi-Li Yzi-Li requested a review from vsajip as a code owner May 9, 2025 10:44
@hugovk hugovk added needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes labels May 9, 2025
@Yzi-Li
Copy link
Contributor Author

Yzi-Li commented May 9, 2025

base64.b85encode() has a boolean parameter pad. In the description of this function, we used "If pad is true". But pad here is a boolean, it must be True or False. And in other descriptions like b64decode(), we used "If valiadate is True".

Should we use True to standardize them?

@serhiy-storchaka
Copy link
Member

No, we should not use this for parameters, because arguments can also be 1, 0, None, etc.

Copy link
Member

@serhiy-storchaka serhiy-storchaka left a comment

Choose a reason for hiding this comment

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

LGTM. 👍

@serhiy-storchaka serhiy-storchaka merged commit 076004a into python:main May 9, 2025
28 checks passed
@github-project-automation github-project-automation bot moved this from Todo to Done in Docs PRs May 9, 2025
@miss-islington-app
Copy link

Thanks @Yzi-Li for the PR, and @serhiy-storchaka for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14.
🐍🍒⛏🤄1�7

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request May 9, 2025
)

(cherry picked from commit 076004a)

Co-authored-by: Yongzi Li <1538321957@qq.com>
@bedevere-app
Copy link

bedevere-app bot commented May 9, 2025

GH-133760 is a backport of this pull request to the 3.14 branch.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request May 9, 2025
)

(cherry picked from commit 076004a)

Co-authored-by: Yongzi Li <1538321957@qq.com>
@bedevere-app bedevere-app bot removed the needs backport to 3.14 bugs and security fixes label May 9, 2025
@bedevere-app
Copy link

bedevere-app bot commented May 9, 2025

GH-133761 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 May 9, 2025
@Yzi-Li Yzi-Li deleted the standardize-bool-in-doc branch May 9, 2025 14:13
@serhiy-storchaka
Copy link
Member

Thank you for your contribution, @Yzi-Li.

serhiy-storchaka pushed a commit that referenced this pull request May 9, 2025
 1�73325) (GH-133760)

(cherry picked from commit 076004a)

Co-authored-by: Yongzi Li <1538321957@qq.com>
serhiy-storchaka pushed a commit that referenced this pull request May 9, 2025
 1�73325) (GH-133761)

(cherry picked from commit 076004a)

Co-authored-by: Yongzi Li <1538321957@qq.com>
@Yzi-Li
Copy link
Contributor Author

Yzi-Li commented May 9, 2025

I'm glad I could contribute in this way. 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir skip issue skip news
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

6 participants