-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
False positive with inline TypedDict and postponed annotations #5935
Comments
Inlined TypedDict is an experimental feature intended to gather feedback about a potential future extension to the type system. It's likely to change or be removed, so please don't make use of it in any production code. Given the status of this feature, I don't generally entertain bug fixes (especially edge cases), but this one happens to be trivial to fix, so I'll do so. |
…side of an inlined TypedDict when `from __future__ import annotations` is in effect. This addresses #5935.
This is addressed in pyright 1.1.327, which I just published. It will also be included in an upcoming release of pylance. |
Describe the bug
When using
from __future__ import annotations
with the experimental inline TypedDict syntax, Pyright gives what I think is a falsereportUndefinedVariable
error for non-string forward references.Code or Screenshots
Code:
Error:
VS Code extension or command-line
Tested using the command line tool.
Pyright:
1.1.326
Python:
3.11.3
The text was updated successfully, but these errors were encountered: