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

Remove redundant NoReturn union in openpyxl #10819

Merged
merged 1 commit into from
Oct 2, 2023

Conversation

Avasam
Copy link
Sponsor Collaborator

@Avasam Avasam commented Oct 1, 2023

From #8217 (comment)

Unless you think there's documentation/semantic value in keeping the union. kindof like how sometimes we have redundant unions with None or Any. In which case I'll update the comment to make that obvious. Although pyright/Pylance seem to completely strip it out.
image

Not going with def tagname(self) -> NoReturn: ... for the reason listed in the comment.

@github-actions
Copy link
Contributor

github-actions bot commented Oct 2, 2023

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

Copy link
Collaborator

@srittau srittau left a comment

Choose a reason for hiding this comment

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

NoReturn doesn't make much sense to me in an union. Many methods can raise an exception without us annotating that.

@srittau srittau merged commit 31916d1 into python:main Oct 2, 2023
47 checks passed
@Avasam Avasam deleted the fix-NoReturn-union branch October 2, 2023 15:06
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

2 participants