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

reportInvalidTypeForm false positive on type alias to Never #490

Closed
DetachHead opened this issue Jul 10, 2024 · 1 comment · Fixed by #730
Closed

reportInvalidTypeForm false positive on type alias to Never #490

DetachHead opened this issue Jul 10, 2024 · 1 comment · Fixed by #730
Labels
type checking / linting issues relating to existing diagnostic rules or proposals for new diagnostic rules upstream bug a bug that also exists in pyright but has not been raised upstream

Comments

@DetachHead
Copy link
Owner

from typing import Never

Foo = Never
value: Foo # error: reportInvalidTypeForm

introduced upstream in 1.1.371

@DetachHead DetachHead added the type checking / linting issues relating to existing diagnostic rules or proposals for new diagnostic rules label Jul 10, 2024
@DetachHead DetachHead added the upstream bug a bug that also exists in pyright but has not been raised upstream label Aug 21, 2024
@DetachHead
Copy link
Owner Author

seems to be partially fixed in 1.1.379, but it's still broken inside functions:

from typing import Never

Foo = Never

value: Foo # no error anymore

def foo():
    value: Foo # error: reportInvalidTypeForm

This was referenced Oct 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type checking / linting issues relating to existing diagnostic rules or proposals for new diagnostic rules upstream bug a bug that also exists in pyright but has not been raised upstream
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant