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

TypeAlias from typing_extensions is not recognised #1161

Closed
layday opened this issue Nov 11, 2020 · 3 comments
Closed

TypeAlias from typing_extensions is not recognised #1161

layday opened this issue Nov 11, 2020 · 3 comments
Labels
addressed in next version Issue is fixed and will appear in next published version bug Something isn't working

Comments

@layday
Copy link

layday commented Nov 11, 2020

Describe the bug
The TypeAlias backport from typing_extensions cannot be used as a substitute for the Python 3.10 TypeAlias.

To Reproduce
Type check the snippet below.

Expected behavior
That foo: TypeAlias = str would not produce any errors.

Screenshots or Code

from typing_extensions import TypeAlias

# Expression of type "Type[str]" cannot be assigned to declared type "TypeAlias"
#   Type "Type[str]" cannot be assigned to type "TypeAlias"
foo: TypeAlias = str

VS Code extension or command-line
Either, 1.1.85

@erictraut
Copy link
Collaborator

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

(I appreciate you sending me some bugs with easy fixes. I've been working on some of your earlier bug reports off and on for over three weeks!)

@erictraut erictraut added addressed in next version Issue is fixed and will appear in next published version bug Something isn't working labels Nov 11, 2020
@layday
Copy link
Author

layday commented Nov 12, 2020

I'm happy to contribute in this small way - I've just sent another easily-fixable bug your way ;)

@erictraut
Copy link
Collaborator

This is now addressed in 1.1.86, which I just published. It will also be included in the next release of pylance.

heejaechang pushed a commit to heejaechang/pyright that referenced this issue Nov 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
addressed in next version Issue is fixed and will appear in next published version bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants