vscode icon indicating copy to clipboard operation
vscode copied to clipboard

Show python class docstring

Open sglbl opened this issue 9 months ago • 0 comments

When I create a class with an init function, VSCode doesn't read the docstring of class but only the __init__.

class Toto:
    """ The Toto class and details """

    class_attribute: str = ""
    """class_attribute (str): (class attribute) The class attribute"""

    def __init__(self):
        """ This is the constructor
    
        Attributes:
            instance_attribute (str): The instance attribute
        """
        self.instance_attribute: str = ""
        
obj = Toto()

Example: Image

(I wasn't sure where to open the issue, here or there https://github.com/microsoft/vscode-python/issues/)
I want to show show python class docstring with __init__ docstring together. It doesn't make sense that class docstring is not shown anymore.

sglbl avatar Mar 07 '25 13:03 sglbl