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
Wrong warning "Code is Unreachable" when not using await in a async method #325
Comments
Thanks for the bug report. You're correct that code after such a call should not be marked unreachable. I've disabled the NoReturn logic for all async functions, since it's often difficult or impossible to detect when the async function will execute. With the fix in place, neither of the above examples will report unreachable code. This fix will be in the next version of Pylance and Pyright. |
Somewhat related... re: the latest Pylance changes (v2020.9.0) I have the latest VSCode and Pylance as of writing. |
@krooq, I'm not sure what you mean. If you think that there's a separate bug, please file a new issue and provide a sample. Thanks! |
Thanks for your attention @erictraut |
This issue has been fixed in version 2020.9.4, which we've just released. You can find the changelog here: https://github.com/microsoft/pylance-release/blob/master/CHANGELOG.md#202094-10-september-2020 |
Environment data
Expected behaviour
Should not show
Code is unreachable
since the method being called is not awaitedActual behaviour
Code Snippet / Additional information
without any
await
using
await
keyword:The text was updated successfully, but these errors were encountered: