Documents explicit type aliases#11800
Merged
JukkaL merged 4 commits intopython:masterfrom Dec 21, 2021
sobolevn:patch-17
Merged
Documents explicit type aliases#11800JukkaL merged 4 commits intopython:masterfrom sobolevn:patch-17
JukkaL merged 4 commits intopython:masterfrom
sobolevn:patch-17
Conversation
docs/source/kinds_of_types.rst
Outdated
|
|
||
| AliasType: TypeAlias = Union[list[dict[tuple[int, str], set[int]]], tuple[str, list[str]]] | ||
|
|
||
| Explicit type aliases solves the ambiguness and improves readability. |
Member
There was a problem hiding this comment.
Suggested change
| Explicit type aliases solves the ambiguness and improves readability. | |
| Explicit type aliases are unambiguous and improve readability. |
"ambiguess" is not a word :)
Member
Author
There was a problem hiding this comment.
Thanks! Sometimes I make quite funny typos 🙂
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
JelleZijlstra
approved these changes
Dec 20, 2021
Collaborator
hauntsaninja
left a comment
There was a problem hiding this comment.
Thanks, might also be worth leaving a note in https://mypy.readthedocs.io/en/stable/common_issues.html#variables-vs-type-aliases
Member
Author
|
@hauntsaninja done! |
JukkaL
pushed a commit
that referenced
this pull request
Dec 22, 2021
Refs https://www.python.org/dev/peps/pep-0613/ Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
tushar-deepsource
pushed a commit
to DeepSourceCorp/mypy
that referenced
this pull request
Jan 20, 2022
Refs https://www.python.org/dev/peps/pep-0613/ Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs https://www.python.org/dev/peps/pep-0613/
I hope that I am correct with mypy's version number 🙂