Skip to content
This repository was archived by the owner on Apr 14, 2022. It is now read-only.
This repository was archived by the owner on Apr 14, 2022. It is now read-only.

Tooltip shows setter docstring instead of GETTER docstring #2142

@gsutra

Description

@gsutra

Environment data

  • VS Code version: 1.52.1
  • Extension version (available under the Extensions sidebar): v2021.2.576481509
  • OS and version: CentOS7
  • Python version (& distribution if applicable, e.g. Anaconda): 3.6.8
  • Type of virtual environment used (N/A | venv | virtualenv | conda | ...): none
  • Relevant/affected Python packages and their versions: none
  • Relevant/affected Python-related VS Code extensions and their versions: none
  • Value of the python.languageServer setting: Microsoft

Expected behaviour

When mouse is over a property, tooltip should display the docstring of the property's GETTER.

Actual behaviour

Tooltip show the property's SETTER.

Steps to reproduce:

  1. Write basic class with property name
class Person:
    """ Represents a person. """

    def __init__(self, name=''):
        self.name = name

    @property
    def name(self) -> str:
        """ GETTER. """
        return self._name

    @name.setter
    def name(self, value: str) -> None:
        """ SETTER. """
        self._name: str = value


if __name__ == '__main__':
    p1 = Person(name='john')
    p1.name
  1. Mouse over the property name.
    issue

Logs

NA

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions