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

Pylance does not suggest keys in nested TypedDicts #1485

Closed
NCPlayz opened this issue Jun 22, 2021 · 2 comments
Closed

Pylance does not suggest keys in nested TypedDicts #1485

NCPlayz opened this issue Jun 22, 2021 · 2 comments
Labels
bug Something isn't working fixed in next version (main) A fix has been implemented and will appear in an upcoming version

Comments

@NCPlayz
Copy link

NCPlayz commented Jun 22, 2021

Environment data

  • Language Server version: v2021.6.2
  • OS and version: Microsoft Windows [Version 10.0.19043.1052]
  • Python version (& distribution if applicable, e.g. Anaconda): Python 3.9.4

Expected behaviour

It is able to give suggestions for a nested TypedDict.

Actual behaviour

It is not able to give suggestions, but still raises errors about not finding the item in the TypedDict.

Logs

[nothing]

Code Snippet / Additional information

gif
image
image

from typing import TypedDict

class NestedDict(TypedDict):
    value: str

class MyDict(TypedDict):
    nested: NestedDict

x: MyDict = { "nested": { "value": "Hello World!" } }
nested = x["nested"]

x["nested"]["value"]
nested["value"]
@erictraut
Copy link
Contributor

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

@erictraut erictraut added bug Something isn't working fixed in next version (main) A fix has been implemented and will appear in an upcoming version and removed triage labels Jun 22, 2021
@bschnurr
Copy link
Member

This issue has been fixed in version 2021.6.3, which we've just released. You can find the changelog here: https://github.com/microsoft/pylance-release/blob/main/CHANGELOG.md#202163-23-june-2021

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working fixed in next version (main) A fix has been implemented and will appear in an upcoming version
Projects
None yet
Development

No branches or pull requests

3 participants