Skip to content

Stubs partially incompatible with jedi since v1.20.0 #18859

@E1k3

Description

@E1k3

Since commit 99051b4 (where missing stubs were added to the setup config) jedi does not find completions/docstrings for some numpy functions (e.g. linspace). This causes LSP servers like pyls and other completion/information sources based on jedi to stop working for these functions.

I am not sure if this is a numpy problem or a jedi problem, but since the behaviour is consistent between jedi versions, but not between numpy versions, I have reported it here first.

List of all symbols (modules/objects/functions/variables) that stopped producing help/completion results after 99051b4: missing_symbols.txt

Reproducing code example:

from jedi import Script
s = Script("""
import numpy as np
np.linspace()
""")
result = s.help(3, 10)
if result:
    print(result[0].docstring())
else:
    print("No help found")

Prints the linspace docstring until commit 99051b4 and prints "No help found" from from then on.

NumPy/Python version information:

From
1.20.0.dev0+99051b4 3.9.4 (default, Apr 20 2021, 15:51:38)
Up to latest (v1.20.2)
[GCC 10.2.0]

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions