Skip to content

Conversation

JelleZijlstra
Copy link
Member

This will exist in 3.11 and in the next release of typing-extensions. See python/cpython#30842 and python/typing#1060. The implementation simply introduces a new synonym for NoReturn.

I didn't do anything with typing.assert_never because it doesn't have any special semantics: it should work just based on the annotations.

I also added explicit support for typing_extensions.NoReturn. I think that one doesn't matter in practice because the typeshed stub for typing-extensions just re-exports typing.NoReturn. Still, it's nice for completeness.

@github-actions
Copy link
Contributor

github-actions bot commented Feb 9, 2022

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

Copy link
Member

@sobolevn sobolevn left a comment

Choose a reason for hiding this comment

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

Great work! 👏

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