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

'Self' string literal type is Unknown in pyright #70

Closed
Avasam opened this issue Nov 27, 2022 · 1 comment · Fixed by #71
Closed

'Self' string literal type is Unknown in pyright #70

Avasam opened this issue Nov 27, 2022 · 1 comment · Fixed by #71

Comments

@Avasam
Copy link
Contributor

Avasam commented Nov 27, 2022

image

non string literal type Self works, but I believe it has issues with mypy iirc. You can use the same workaround as typeshed does by defining a TypeVar: Self = TypeVar("Self")

@cpburnz
Copy link
Owner

cpburnz commented Dec 3, 2022

@Avasam Thanks for pointing this out as well. My adhoc method was messy.

cpburnz added a commit that referenced this issue Dec 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants