Reputation: 1
I am trying to change the default docstring text that Spyder generates when creating a new function. I like how I can automatically create a docstring template, but I wanted to change the text. If you don't know what I mean, here is the docstring Spyder generates:
def example_function(n):
"""
Parameters
----------
n : TYPE
DESCRIPTION.
Returns
-------
None.
"""
I would be grateful if anyone has a way to change this text. Thanks.
Upvotes: 0
Views: 1977
Reputation: 34156
(Spyder maintainer here) There's no way to change the template text introduced by Spyder to create docstrings.
However, you can select between two different types of docstring formats (Numpy and Google) by going to the menu
Tools > Preferences > Editor > Advanced settings > Docstring type
.
Upvotes: 3