Skip to content

Fix various TypeAlias issues #8248

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 2 commits into from
Jul 7, 2022
Merged

Fix various TypeAlias issues #8248

merged 2 commits into from
Jul 7, 2022

Conversation

AlexWaygood
Copy link
Member

Copy link
Collaborator

@hauntsaninja hauntsaninja left a comment

Choose a reason for hiding this comment

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

The reasoning behind removing the conditional type alias annotations isn't clear to me

@AlexWaygood
Copy link
Member Author

The reasoning behind removing the conditional type alias annotations isn't clear to me

Yeah, tbh I'm slightly unsure for those ones about whether it's better to consider them as type aliases or variable aliases. Happy to revert those changes if you think it's better the way it is; don't really have a strong opinion there.

@github-actions

This comment has been minimized.

@AlexWaygood AlexWaygood requested a review from hauntsaninja July 6, 2022 20:26
@github-actions
Copy link
Contributor

github-actions bot commented Jul 6, 2022

According to mypy_primer, this change has no effect on the checked open source code. 🤖🎉

Copy link
Collaborator

@hauntsaninja hauntsaninja left a comment

Choose a reason for hiding this comment

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

Thanks! These are simple and uncontroversial. I don't have a strong opinion on the removed ones, so if there is some benefit feel free to open another PR.

@hauntsaninja hauntsaninja merged commit 9ccf458 into master Jul 7, 2022
@hauntsaninja hauntsaninja deleted the aliases branch July 7, 2022 12:18
@AlexWaygood
Copy link
Member Author

Thanks! These are simple and uncontroversial. I don't have a strong opinion on the removed ones, so if there is some benefit feel free to open another PR.

I thought there were some benefits, but I was playing around on mypy playground and couldn't find any reason to make the change in terms of actually improving the stub. It reduces the hits from PyCQA/flake8-pyi#240, but I think that that approach probably isn't viable anyway, so I don't think that's a good reason to make those changes ¯\_(ツ)_/¯

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.

2 participants