Thanks to visit codestin.com
Credit goes to github.com

Skip to content

gh-123494: Improve documentation for webbrowser return types #123495

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 1 commit into from
Sep 1, 2024

Conversation

akx
Copy link
Contributor

@akx akx commented Aug 30, 2024

This PR improves the documentation for the return types in the webbrowser module.


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

@ghost
Copy link

ghost commented Aug 30, 2024

All commit authors signed the Contributor License Agreement.
CLA signed

@bedevere-app
Copy link

bedevere-app bot commented Aug 30, 2024

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

@akx akx marked this pull request as ready for review August 30, 2024 08:07
Copy link
Member

@Eclips4 Eclips4 left a comment

Choose a reason for hiding this comment

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

Please, remove the type annotations.

@akx
Copy link
Contributor Author

akx commented Aug 30, 2024

Please, remove the type annotations.

Why, please? The module already has some type annotations anyway.

@Eclips4
Copy link
Member

Eclips4 commented Aug 30, 2024

Please, remove the type annotations.

Why, please? The module already has some type annotations anyway.

The only type annotations in this module are present in two relatively new functions (parse_args and main). As a rule, we do not add type annotations to the standard library. Types for the standard library are maintained at https://github.com/python/typeshed.

@Eclips4
Copy link
Member

Eclips4 commented Aug 30, 2024

Also, please, remove the NEWS file. This PR doesn't need it.

@akx akx force-pushed the improve-webbrowser branch from 8dff656 to a889674 Compare August 30, 2024 11:08
@akx
Copy link
Contributor Author

akx commented Aug 30, 2024

As a rule, we do not add type annotations to the standard library.

Okay, I didn't know about this rule. (Is it documented somewhere?)

Ripped out the annotation commit.

Also, please, remove the NEWS file. This PR doesn't need it.

Done, ripped out that commit too.

@akx akx changed the title gh-123494: Improve type annotations and documentation for webbrowser gh-123494: Improve documentation for webbrowser return types Aug 30, 2024
Copy link
Member

@AA-Turner AA-Turner left a comment

Choose a reason for hiding this comment

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

Thanks! (though just to note, please avoid force-pushing in the future, we squash merge all commits.)

A

@AA-Turner AA-Turner added needs backport to 3.12 only security fixes needs backport to 3.13 bugs and security fixes labels Aug 30, 2024
@AA-Turner AA-Turner added the docs Documentation in the Doc dir label Sep 1, 2024
@AA-Turner AA-Turner merged commit 0b6acfe into python:main Sep 1, 2024
39 checks passed
@miss-islington-app
Copy link

Thanks @akx for the PR, and @AA-Turner for merging it 🌮🎉.. I'm working now to backport this PR to: 3.12, 3.13.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Sep 1, 2024
pythonGH-123495)

Document the return value for ``webbrowser.open*()``.
(cherry picked from commit 0b6acfe)

Co-authored-by: Aarni Koskela <[email protected]>
@bedevere-app
Copy link

bedevere-app bot commented Sep 1, 2024

GH-123548 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 Sep 1, 2024
miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Sep 1, 2024
pythonGH-123495)

Document the return value for ``webbrowser.open*()``.
(cherry picked from commit 0b6acfe)

Co-authored-by: Aarni Koskela <[email protected]>
@bedevere-app
Copy link

bedevere-app bot commented Sep 1, 2024

GH-123549 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 Sep 1, 2024
AA-Turner pushed a commit that referenced this pull request Sep 1, 2024
…es (GH-123495) (#123549)

gh-123494: Improve documentation for ``webbrowser`` return types (GH-123495)

Document the return value for ``webbrowser.open*()``.
(cherry picked from commit 0b6acfe)

Co-authored-by: Aarni Koskela <[email protected]>
AA-Turner pushed a commit that referenced this pull request Sep 1, 2024
…es (GH-123495) (#123548)

gh-123494: Improve documentation for ``webbrowser`` return types (GH-123495)

Document the return value for ``webbrowser.open*()``.
(cherry picked from commit 0b6acfe)

Co-authored-by: Aarni Koskela <[email protected]>
@akx akx deleted the improve-webbrowser branch September 1, 2024 20:20
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 news
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants