-
-
Notifications
You must be signed in to change notification settings - Fork 31.4k
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
Conversation
@@ -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. |
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
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. |
Thanks @simon04 for the PR, and @JelleZijlstra for merging it 🌮🎉.. I'm working now to backport this PR to: 3.10, 3.11. |
(cherry picked from commit 0238965) Co-authored-by: Simon Legner <Simon.Legner@gmail.com>
Sorry, @simon04 and @JelleZijlstra, I could not cleanly backport this to |
GH-98292 is a backport of this pull request to the 3.11 branch. |
GH-98293 is a backport of this pull request to the 3.10 branch. |
(cherry picked from commit 0238965) Co-authored-by: Simon Legner <Simon.Legner@gmail.com>
(cherry picked from commit 0238965) Co-authored-by: Simon Legner <Simon.Legner@gmail.com>
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.