microsoft / pylance-release

Documentation and issues for Pylance
Creative Commons Attribution 4.0 International
1.72k stars 766 forks source link

pylance not showing the info of the methods in random class in numpy module #1296

Closed arian47 closed 3 years ago

arian47 commented 3 years ago

Environment data

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 commented 3 years ago

what version of numpy?

import numpy
print(numpy.__version__)
arian47 commented 3 years ago

python3.9 -m pip list | grep numpy 1.20.3

arian47 commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

I know numpy is still working on their stubs, some missing entries will be updated in their next release. https://github.com/microsoft/pylance-release/issues/150#issuecomment-842312255

Please log any new missing stub issue with them.

bschnurr commented 3 years ago

you could try bringing that new pyi version over locally

jakebailey commented 3 years ago

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.