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 not showing the info of the methods in random class in numpy module #1296

Closed
arian47 opened this issue May 16, 2021 · 7 comments
Closed
Labels
waiting for upstream Waiting for upstream to release a fix

Comments

@arian47
Copy link

arian47 commented May 16, 2021

Environment data

  • python extension version: v2021.6.842802838-dev
  • Language Server version: v2021.5.3-pre.1
  • OS and version: ubuntu 21.04
  • Python version (& distribution if applicable, e.g. Anaconda): 3.9.4 64-bit

Expected behaviour

intellisense showing the info about the methods available in random class of the numpy module

Actual behaviour

no info being showed by the intellisense

Code Snippet / Additional information

numpy.random.

@bschnurr
Copy link
Member

what version of numpy?

import numpy
print(numpy.__version__)

@arian47
Copy link
Author

arian47 commented May 17, 2021

python3.9 -m pip list | grep numpy
1.20.3

@arian47
Copy link
Author

arian47 commented May 17, 2021

it doesn't also show the numpy.ndarray object methods info too
I will keep adding the problems i do encounter for this module or if you want me to create another issue please tell me.

@bschnurr
Copy link
Member

bschnurr commented May 17, 2021

Ok. currently numpy.random.random is stubbed as Any in 1.20.3

but in their dev branch they have fixed the issue
https://github.com/numpy/numpy/blob/main/numpy/random/__init__.pyi

so next 1.21 should have it.

@bschnurr bschnurr added the waiting for user response Requires more information from user label May 17, 2021
@github-actions github-actions bot removed the triage label May 17, 2021
@bschnurr
Copy link
Member

I know numpy is still working on their stubs, some missing entries will be updated in their next release.
#150 (comment)

Please log any new missing stub issue with them.

@bschnurr bschnurr added waiting for upstream Waiting for upstream to release a fix and removed waiting for user response Requires more information from user labels May 17, 2021
@bschnurr
Copy link
Member

you could try bringing that new pyi version over locally

@jakebailey
Copy link
Member

This works here:

image

As does:

image

But this issue appears to be about the contents themselves being missing items ("not showing info of the methods"), which I believe to be covered by #150 and likely resolved in the next numpy release. I'll close this in favor of #150.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
waiting for upstream Waiting for upstream to release a fix
Projects
None yet
Development

No branches or pull requests

3 participants