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

docs(typing): harmonize "See PEP x for more details" #97927

Merged
merged 1 commit into from
Oct 15, 2022

Conversation

simon04
Copy link
Contributor

@simon04 simon04 commented Oct 5, 2022

Sticking to the same phrase "See PEP x for more details" makes it easier for the reader (to skim for the relevant part). Feel free to discard this PR if you disagree.

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
@@ -1038,8 +1038,7 @@ These can be used as types in annotations using ``[]``, each having a unique syn
Special typing constructs that mark individual keys of a :class:`TypedDict`
as either required or non-required respectively.

For more information, see :class:`TypedDict` and
:pep:`655` ("Marking individual TypedDict items as required or potentially missing").
See :class:`TypedDict` and :pep:`655` for more details.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The names of the PEPs are already spelled out in the section "Relevant PEPs".

@@ -1190,8 +1189,7 @@ These can be used as types in annotations using ``[]``, each having a unique syn
is not a subtype of the former, since ``list`` is invariant.
The responsibility of writing type-safe type guards is left to the user.

``TypeGuard`` also works with type variables. For more information, see
:pep:`647` (User-Defined Type Guards).
``TypeGuard`` also works with type variables. See :pep:`647` for more details.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The names of the PEPs are already spelled out in the section "Relevant PEPs".

Copy link
Member

@JelleZijlstra JelleZijlstra left a comment

Choose a reason for hiding this comment

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

Thanks!

@gvanrossum
Copy link
Member

Not really relevant to this PR, but aren't we somewhat reluctant to link to PEPs, since PEPs are frozen in time while features evolve?

@JelleZijlstra
Copy link
Member

Not really relevant to this PR, but aren't we somewhat reluctant to link to PEPs, since PEPs are frozen in time while features evolve?

True, but for now we don't really have a better alternative. We also do it for non-typing features: reference/lexical_analysis.html#f-strings links to PEP 498, https://docs.python.org/3/library/dataclasses.html to PEP 557.

@JelleZijlstra JelleZijlstra merged commit 0238965 into python:main Oct 15, 2022
@miss-islington
Copy link
Contributor

Thanks @simon04 for the PR, and @JelleZijlstra for merging it 🌮🎉.. I'm working now to backport this PR to: 3.10, 3.11.
🐍🍒⛏🤖

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request Oct 15, 2022
(cherry picked from commit 0238965)

Co-authored-by: Simon Legner <Simon.Legner@gmail.com>
@miss-islington
Copy link
Contributor

Sorry, @simon04 and @JelleZijlstra, I could not cleanly backport this to 3.10 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker 02389658a4751a0166e2ed22be112b646378a01b 3.10

@bedevere-bot
Copy link

GH-98292 is a backport of this pull request to the 3.11 branch.

@bedevere-bot bedevere-bot removed the needs backport to 3.11 only security fixes label Oct 15, 2022
@bedevere-bot
Copy link

GH-98293 is a backport of this pull request to the 3.10 branch.

@bedevere-bot bedevere-bot removed the needs backport to 3.10 only security fixes label Oct 15, 2022
miss-islington added a commit that referenced this pull request Oct 15, 2022

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
(cherry picked from commit 0238965)

Co-authored-by: Simon Legner <Simon.Legner@gmail.com>
JelleZijlstra added a commit that referenced this pull request Oct 16, 2022

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
…. (#98293)

(cherry picked from commit 0238965)

Co-authored-by: Simon Legner <Simon.Legner@gmail.com>
pablogsal pushed a commit that referenced this pull request Oct 22, 2022

Verified

This commit was signed with the committer’s verified signature.
pablogsal Pablo Galindo Salgado
(cherry picked from commit 0238965)

Co-authored-by: Simon Legner <Simon.Legner@gmail.com>
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
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants