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

Incorrect Self import breaks pyright type-checking #100

Closed
2 tasks done
jakkdl opened this issue Dec 22, 2023 · 2 comments · Fixed by #101
Closed
2 tasks done

Incorrect Self import breaks pyright type-checking #100

jakkdl opened this issue Dec 22, 2023 · 2 comments · Fixed by #101
Labels
bug Something isn't working

Comments

@jakkdl
Copy link
Contributor

jakkdl commented Dec 22, 2023

Things to check first

  • I have searched the existing issues and didn't find my bug already reported there

  • I have checked that my bug is still present in the latest release

Exceptiongroup version

1.2.0

Python version

3.10

What happened?

.

How can we reproduce the bug?

microsoft/pyright#6795

@jakkdl jakkdl added the bug Something isn't working label Dec 22, 2023
@agronholm
Copy link
Owner

I'm not super thrilled to add a dependency (even a conditional one) to a project that is currently dependency free, and for something that provides no benefits at run time. Is there any way around this?

@jakkdl
Copy link
Contributor Author

jakkdl commented Dec 23, 2023

I'm not super thrilled to add a dependency (even a conditional one) to a project that is currently dependency free, and for something that provides no benefits at run time. Is there any way around this?

Ah, there is! Self is a convenience class that can be replaced by usage of TypeVar - see https://docs.python.org/3/library/typing.html#typing.Self

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants