Skip to content

Docstring popup breaks indented code formatting w/o trailing whitespace #787

@ray-grointel

Description

@ray-grointel

Environment data

VS Code version: 1.2.0
Python Extension version: 2018.1
Python Version: 3.6.3
OS and version: macOS 10.12

Actual behavior

If you hover over this function for its docstring popup, if the trailing whitespace represented by .... is missing, the formatting for the indented code breaks.

def fixtures_dir(request):
    """Return the test fixtures directory under `FIXTURES_DIR`.

    Example::

        from conftest import BASE_DIR
........
        def test_something(fixtures_dir):
            assert fixtures_dir.strpath == BASE_DIR + '/some/path'

    :rtype: py.path.LocalPath
    """

Expected behavior

The indented code formatting inside the docstring popup should not change with/without the trailing whitespace.

Steps to reproduce:

  • Write the function
  • Add/remove the trailing whitespace
  • Hover over the function

Logs

Output from Python output panel

N/A

Output from Console window (Help->Developer Tools menu)

N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-intellisenseLSP-related functionality: auto-complete, docstrings, navigation, refactoring, etc.bugIssue identified by VS Code Team member as probable buginfo-neededIssue requires more information from poster

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions