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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Documents explicit type aliases #11800

Merged
merged 4 commits into from Dec 21, 2021
Merged

Documents explicit type aliases #11800

merged 4 commits into from Dec 21, 2021

Conversation

sobolevn
Copy link
Member

@sobolevn sobolevn commented Dec 20, 2021

Refs https://www.python.org/dev/peps/pep-0613/

I hope that I am correct with mypy's version number 馃檪


AliasType: TypeAlias = Union[list[dict[tuple[int, str], set[int]]], tuple[str, list[str]]]

Explicit type aliases solves the ambiguness and improves readability.
Copy link
Member

@JelleZijlstra JelleZijlstra Dec 20, 2021

Choose a reason for hiding this comment

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

Suggested change
Explicit type aliases solves the ambiguness and improves readability.
Explicit type aliases are unambiguous and improve readability.

"ambiguess" is not a word :)

Copy link
Member Author

@sobolevn sobolevn Dec 20, 2021

Choose a reason for hiding this comment

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

Thanks! Sometimes I make quite funny typos 馃檪

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Copy link
Collaborator

@hauntsaninja hauntsaninja left a comment

@sobolevn
Copy link
Member Author

sobolevn commented Dec 21, 2021

@hauntsaninja done!

@JukkaL JukkaL merged commit 578898d into python:master Dec 21, 2021
1 check passed
JukkaL pushed a commit that referenced this issue 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 deepsourcelabs/mypy that referenced this issue Jan 20, 2022
Refs https://www.python.org/dev/peps/pep-0613/

Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants