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

Allow NoReturn to appear outside of function return type annotations #5

Closed
erictraut opened this issue Jan 10, 2024 · 3 comments
Closed
Labels

Comments

@erictraut
Copy link
Collaborator

I would like request that the typing council consider amending the typing spec to allow NoReturn to appear in locations other than return type annotations. It is equivalent to Never, and the two types should be completely interchangeable.

This was discussed in the python/typing forum, and there were no objections to the change.

All four major type checkers already treat NoReturn in the manner consistent with the proposed change, so this would bring the spec in conformance with the type checker implementations.

I've prepared this PR with the proposed change to the typing spec.

@gvanrossum
Copy link
Member

+1.

Do we have a process for this kind of thing yet? Do we all just approve the PR and then you merge it?

@JelleZijlstra
Copy link
Member

Also agree. I think for this sort of small, relatively uncontroversial change it's OK to just approve on GitHub. We can have a bigger discussion on Discord for anything more controversial.

@JelleZijlstra
Copy link
Member

Everyone on the Council approved the PR; this proposal has been accepted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants