Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change PyCharms docstring autocomplete?

I have been programming in PyCharm for a little while now and I like it just fine however there is one little thing that is nagging at me, when I go to generate a new docstring for a function that I have defined PyCharm will autocomplete the docstring using what I believe is sphinx style formatting. Example in picture below:

PyCharm default docstring autocomplete

I'd like to change this format to something appear like the docstrings throughout the numpy module. Here is the beginning of the docstring for numpy.max for an example;

Docstring for numpy.max

Is there a way I can either A) quickly swap the PyCharm docstring autocomplete method or B) cumstomize the existing autocomplete method?

like image 875
James Draper Avatar asked Sep 27 '16 17:09

James Draper


1 Answers

You can adjust this by going to the Python Integrated Tools settings.

On Windows/Linux

File -> Settings -> Tools -> Python Integrated Tools 

On OS X

PyCharm -> Preferences -> Tools -> Python Integrated Tools

Then there is a Docstrings section. Change the drop down format to NumPy and press "OK"

Docstring format

like image 116
Andy Avatar answered Sep 24 '22 18:09

Andy