pylance-release icon indicating copy to clipboard operation
pylance-release copied to clipboard

Not show numpy classes docs.

Open GF-Huang opened this issue 1 year ago • 4 comments

Environment data

  • VS Code version:
版本: 1.92.2 (user setup)
提交: fee1edb8d6d72a0ddff41e5f71a671c23ed924b9
日期: 2024-08-14T17:29:30.058Z
Electron: 30.1.2
ElectronBuildId: 9870757
Chromium: 124.0.6367.243
Node.js: 20.14.0
V8: 12.4.254.20-electron.0
OS: Windows_NT x64 10.0.22631
  • Jupyter Extension version (available under the Extensions sidebar): v2024.7.0
  • Python Extension version (available under the Extensions sidebar): v2024.12.3
  • OS (Windows | Mac | Linux distro) and version: Win11 23H2 22631.4037
  • Python and/or Anaconda version: 3.11.9
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): Miniconda 24.5.0
  • Jupyter server running: Local

Expected behaviour

Show docs when my mouse hover the class np.vectorize:

Help on class vectorize in module numpy:

class vectorize(builtins.object)
 |  vectorize(pyfunc, otypes=None, doc=None, excluded=None, cache=False, signature=None)
 |  
 |  vectorize(pyfunc, otypes=None, doc=None, excluded=None, cache=False,
 |            signature=None)
 |  
 |  Generalized function class.
..............

Actual behaviour

Not show.

image

Steps to reproduce:

[NOTE: Self-contained, minimal reproducing code samples are extremely helpful and will expedite addressing your issue]

  1. XXX

Logs

Output for Jupyter in the Output panel (ViewOutput, change the drop-down the upper-right of the Output panel to Jupyter)

XXX

GF-Huang avatar Aug 27 '24 08:08 GF-Huang

Do you have the pylance extension installed

DonJayamanne avatar Aug 27 '24 10:08 DonJayamanne

Do you have the pylance extension installed

Yes. v2024.8.1

GF-Huang avatar Aug 27 '24 19:08 GF-Huang

Docstring is on impl in numpy\lib\_function_base_impl.py. We'll pick up a docstring from the stub (numpy\__init__.pyi) if it's added, but we're apparently not looking at the impl docstring.

debonte avatar Aug 27 '24 20:08 debonte

My guess is the init.py is dynamic? And we're not following the if statement for the export?

This code here:

if __NUMPY_SETUP__:
    sys.stderr.write('Running from numpy source directory.\n')
else:
    # Allow distributors to run custom init code before importing numpy._core
    from . import _distributor_init

rchiodo avatar Aug 27 '24 20:08 rchiodo