-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Migrate from typing.NoReturn
to typing.Never
#13891
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
Comments
I don't know why, but even where |
I see no reason to deprecate |
I'm not suggesting to mark it as deprecated, I'm just suggesting to use the preferred type also judging by the discussion when adding |
|
Sorry, I seem to have jumped to conclusions based on this issue message (python/cpython#132941 (comment)):
I already found another message that confirms your comment: python/cpython#117492 (comment) then it remains unclear to me why soft deprecate it if we want to use continue |
Whilst they are equivalent. There's a semantic difference. And typeshed is no stranger to using type name alias to express different semantic ( If python/cpython#132941 is accepted to where But as it stands:
I can get behind the semantic of "a function that |
Also if we go that route, I'd prefer having a lint rule to enforce that soft deprecation in https://github.com/PyCQA/flake8-pyi / https://docs.astral.sh/ruff/rules/#flake8-pyi-pyi (the more guidelines are codified/automated, the easier it is to review and stay on track) |
I suggest using preferred option (
Never
) to indicate the bottom type.Using
NoReturn
is still popular (and more well known) I think because the types in stdlib use it (one of the reasons), I think it's worth using the option we want to promotecc @JelleZijlstra (inspired by your recent issue on soft deprecation)
The text was updated successfully, but these errors were encountered: