Leonardus Chen
Leonardus Chen

Reputation: 1244

How to make PyLance parse NumPy style docstring properly in VSCode?

Consider the following function

def add(x: int, y: int) -> int:
    """ Add two numbers

    Parameters
    ----------
    x : int
        First integer
    y : int
        Second integer

    Returns
    int
        Results

    """
    return x + y

When I hover my mouse over add I get the following (LHS using Jedi and RHS using PyLance)

enter image description here

Is there a known way to get PyLance parse the docstring properly like Jedi does?

Upvotes: 3

Views: 2193

Answers (1)

Jill Cheng
Jill Cheng

Reputation: 10354

According to your description, I reproduced this problem.

Thank you for posting this problem here, and we have already submitted it, let us look forward to the improvement of this function.

Github link: How to keep the content of Parameter suggestions displayed by Pylance in the original style?

Upvotes: 1

Related Questions