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

Statements failed in pylance but passed in mypy again #871

Closed
Char2sGu opened this issue Jan 23, 2021 · 4 comments
Closed

Statements failed in pylance but passed in mypy again #871

Char2sGu opened this issue Jan 23, 2021 · 4 comments
Labels
duplicate This issue or pull request already exists

Comments

@Char2sGu
Copy link

Environment data

  • Language Server version: 2021.1.1
  • OS and version: Windows 10 Work Station 1909
  • Python version: Python 3.9.0 64-bit

Expected behaviour

Actual behaviour

from typing import TypedDict


class MyDict(TypedDict):
    k: int


# ok
mydict: MyDict = {'k': 1}


class BaseClass:
    # ok
    mydict: MyDict = {'k': 1}


class SubClass(BaseClass):
    # failed!!!!!
    mydict = {'k': 1}
    """
    "mydict" overrides symbol of same name in class "BaseClass"
      "dict[str, int]" is incompatible with "MyDict"PylancereportIncompatibleVariableOverride
    test.py(13, 5): Overridden symbol
    """

Logs

Code Snippet / Additional information

@erictraut
Copy link
Contributor

This is a duplicate of #861. A fix is already in place and will be included in next week's pylance release.

@erictraut erictraut added duplicate This issue or pull request already exists fixed in next version (main) A fix has been implemented and will appear in an upcoming version and removed triage labels Jan 23, 2021
@Char2sGu
Copy link
Author

Char2sGu commented Jan 23, 2021

Sorry I've updated pylance and found that the previous bug in #861 is already fixed, so I thought this may be a new one.

@Char2sGu Char2sGu changed the title Statements failed in pylance but passed in mypy again!!!!! Statements failed in pylance but passed in mypy again Jan 23, 2021
@erictraut
Copy link
Contributor

We haven't published a new version of pylance since that bug was fixed. We typically publish on Wed of each week. We close the associated bug reports just after we publish, so watch for that notification.

@jakebailey
Copy link
Member

Closing as a duplicate of #861.

@jakebailey jakebailey removed the fixed in next version (main) A fix has been implemented and will appear in an upcoming version label Jan 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

3 participants