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

raise Exception from self leads to reported error #806

Closed
audoh-tickitto opened this issue Jan 5, 2021 · 3 comments
Closed

raise Exception from self leads to reported error #806

audoh-tickitto opened this issue Jan 5, 2021 · 3 comments
Labels
bug Something isn't working fixed in next version (main) A fix has been implemented and will appear in an upcoming version

Comments

@audoh-tickitto
Copy link

Environment data

  • Language Server version: 2020.12.2
  • OS and version: Windows 10 Pro, 20H2, 19042.685
  • Python version (& distribution if applicable, e.g. Anaconda): 3.9.0 acquired via pyenv

Expected behaviour

No error should be reported.

Actual behaviour

The following error is reported:

Expected exception object or None
  "FooError" does not derive from BaseException

Logs

N/A

Code Snippet / Additional information

class FooError(BaseException):
    def bar(self) -> None:
        raise Exception("baz") from self

The same also happens if extending any subclass of BaseException.

@github-actions github-actions bot added the triage label Jan 5, 2021
@judej judej added the bug Something isn't working label Jan 5, 2021
@judej
Copy link
Contributor

judej commented Jan 5, 2021

@erictraut, would you please take a look a this?
thanks

@github-actions github-actions bot removed the triage label Jan 5, 2021
@erictraut
Copy link
Contributor

Thanks for the bug report. This will be fixed in the next release.

@erictraut erictraut added the fixed in next version (main) A fix has been implemented and will appear in an upcoming version label Jan 5, 2021
@jakebailey
Copy link
Member

This issue has been fixed in version 2021.1.0, which we've just released. You can find the changelog here: https://github.com/microsoft/pylance-release/blob/main/CHANGELOG.md#202110-6-january-2021

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fixed in next version (main) A fix has been implemented and will appear in an upcoming version
Projects
None yet
Development

No branches or pull requests

4 participants