bettermanlu
bettermanlu

Reputation: 655

python IDE for auto-complete Docstring

I am looking for a Python IDE which can generate the docstrings framework for me automatically. For example:

   def GetTextByCtrlName(self, _hwnd, _ctrName):
        '''
        @desc:

        @param:
             _hwnd 
             _ctrName  
        '''
        

Then I can just fill the corresponding content.

Upvotes: 1

Views: 2142

Answers (3)

Harris Minhas
Harris Minhas

Reputation: 790

Use VSCode and try the extension 'trelent' to create docstrings. I have been using it for some time with python and it is really helpful. enter image description here

Upvotes: 0

Burhan Khalid
Burhan Khalid

Reputation: 174624

PyCharm has supported this since version 1.5.

First, configure the format you want the docstring to be generated. Hit CTRL+ALT+S (on Windows), select the format in Project Settings > Python Integrated Tools.

Your choices are plain, Epydoc or reStructuredText

Once that is configured, make sure your cursor is on the method name and press Alt+Enter.

Upvotes: 2

Gleno
Gleno

Reputation: 16949

You could use a tool like Sphinx. It's designed to specifically document python code, although it doesn't offer a friendly IDE integration.

Upvotes: -1

Related Questions