You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
regression: type alias for NoReturn no longer works as a type annotation #11903
changed the title [-]type alias for `NoReturn` no longer works as a type annotation[/-][+]regression: type alias for `NoReturn` no longer works as a type annotation[/+]on Jan 5, 2022
Not seriously suggesting this, but a fun workaround happens to be from mypy_extensions import NoReturn, since I did a slightly different thing in python/typeshed#6595
Btw, if you have a repo with code that contains this, let me know and I'll add it to mypy primer so these regressions don't happen in the first place :-)
Activity
[-]type alias for `NoReturn` no longer works as a type annotation[/-][+]regression: type alias for `NoReturn` no longer works as a type annotation[/+]hauntsaninja commentedon Jan 5, 2022
Thanks for the report. I think this is a side effect of python/typeshed#6290
Not seriously suggesting this, but a fun workaround happens to be
from mypy_extensions import NoReturn, since I did a slightly different thing in python/typeshed#6595hauntsaninja commentedon Jan 5, 2022
Btw, if you have a repo with code that contains this, let me know and I'll add it to mypy primer so these regressions don't happen in the first place :-)
sobolevn commentedon Jan 5, 2022
Because I have literally 100s other issues to fix, I am playing around with this one 🤔
AlexWaygood commentedon Jan 5, 2022
Here's another workaround that works fine on 0.930: