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

Error type report for inspect.Parameter.empty #1872

Closed
yanyongyu opened this issue Sep 24, 2021 · 6 comments
Closed

Error type report for inspect.Parameter.empty #1872

yanyongyu opened this issue Sep 24, 2021 · 6 comments
Labels
fixed in next version (main) A fix has been implemented and will appear in an upcoming version

Comments

@yanyongyu
Copy link

Environment data

  • Language Server version: 2021.9.3
  • OS and version: linux x64
  • Python version (and distribution if applicable, e.g. Anaconda):
  • python.analysis.indexing: undefined
  • python.analysis.typeCheckingMode: basic

Expected behaviour

No issue should be reported

Actual behaviour

inspect.Parameter.empty is reported as type _empty instead of Type[_empty]

Code Snippet / Additional information

inspect.Parameter.empty
inspect._empty

image

image

image

image

image

@yanyongyu
Copy link
Author

yanyongyu commented Sep 24, 2021

this seems to be the typeshed problem. caused by python/typeshed#6020

@erictraut
Copy link
Contributor

It looks like this was fixed in typeshed 6 days ago. It will be fixed in pylance the next time we merge the latest typeshed changes.

@yanyongyu
Copy link
Author

Thanks for answering.

This problem is caused by that pull request merged 6 days ago and i have just opened an issue in typeshed repo.

I hope this can be solved and merge into pylance!

@jakebailey jakebailey added the waiting for upstream Waiting for upstream to release a fix label Sep 24, 2021
@github-actions github-actions bot removed the triage label Sep 24, 2021
@yanyongyu
Copy link
Author

fixed in typeshed master! this issue will be fixed in next time pylance merge typeshed

@erictraut
Copy link
Contributor

Great! I just pulled the latest version of the typeshed stubs into the pyright repo, so this will appear in the next release of pyright & pylance.

@erictraut erictraut added fixed in next version (main) A fix has been implemented and will appear in an upcoming version and removed waiting for upstream Waiting for upstream to release a fix labels Sep 27, 2021
@jakebailey
Copy link
Member

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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