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

Intellisense does not show the complete multiline description of function/method parameters #2942

Closed
luabud opened this issue Jun 15, 2022 Discussed in #2648 · 2 comments
Closed
Assignees
Labels
bug Something isn't working docstrings fixed in next version (main) A fix has been implemented and will appear in an upcoming version

Comments

@luabud
Copy link
Member

luabud commented Jun 15, 2022

Discussed in #2648

Originally posted by Diogo-Rossi September 10, 2021

Environment data

  • VS Code version: 1.60.0
  • Extension version: 2021.9.1218897484
  • OS and version: Windows_NT x64 10.0.19043
  • Python version: 3.8.8, Anaconda
  • Type of virtual environment used: conda
  • Relevant/affected Python packages and their versions: none
  • Relevant/affected Python-related VS Code extensions and their versions: Pylance 2021.9.1
  • Value of the python.languageServer setting: Default

Expected behaviour

Intellisense should show descriptions of function/method parameters of the Docstring as you type then, like the example below.

gif000

Actual behaviour

When the descriptions of function/method parameters takes more than one line in the docstring,
the descriptions shows only the first line.

gif001

Steps to reproduce:

Write a function like the one show above with multiline parameters descriptions in the docstring, and try to use it,
or try to use a function that already exists.

Here is the snippet, to help:

def foo(a:int,b:float,c:str):
    """
        Parameters
        ----------
            a (int): integer number.
            b (float): description that takes
                more than 1 line in docstr
            c (str): word.
    """
    pass
@luabud luabud added enhancement New feature or request in review bug Something isn't working docstrings and removed enhancement New feature or request in review labels Jun 15, 2022
@rchiodo rchiodo assigned rchiodo and unassigned debonte May 24, 2024
@rchiodo rchiodo added fixed in next version (main) A fix has been implemented and will appear in an upcoming version and removed fixed in next version (main) A fix has been implemented and will appear in an upcoming version labels Jun 12, 2024
@rchiodo
Copy link
Contributor

rchiodo commented Jun 14, 2024

This issue has been fixed in prerelease version 2024.6.100, which we've just released. You can find the changelog here: CHANGELOG.md

@rchiodo rchiodo closed this as completed Jun 14, 2024
@rchiodo
Copy link
Contributor

rchiodo commented Jun 14, 2024

The fix for this issue is behind an experimental feature flag:

"python.analysis.supportRestructuredText": true

If you want to try out our new restructuredText support, enable this flag. It's behind a flag at the moment until we can make sure it handles all the possible Sphinx/GoogleDoc/Epytext scenarios that customers need. Please log additional issues if this setting isn't working out for you.

Thanks :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working docstrings fixed in next version (main) A fix has been implemented and will appear in an upcoming version
Projects
None yet
Development

No branches or pull requests

3 participants