Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PyCharm not inserting docstring stub for class?

I have the following piece of code:

class Note:
    def __init__(self, note=None, duration=None, start_time=None):
        self.note = note
        self.duration = duration
        self.start_time = start_time

I wanted to generate a docstring for the class according to the NumPy docstring style, but it doesn't autocomplete. I have chosen the NumPy format in the settings under File | Settings | Tools | Python Integrated Tools

The auto complete works for def __init__(). When I start a new line after it and type ''' it automatically inserts this:

'''

Parameters
----------
note :
duration :
start_time :
'''

But when I do the same thing under class Note: it doesn't do that. I'm using PyCharm 2017.3.3

like image 520
pyjamas Avatar asked Feb 14 '18 03:02

pyjamas


1 Answers

This seems to be a feature request with no current due date or version: https://youtrack.jetbrains.com/issue/PY-16760

like image 68
daniestevez Avatar answered Oct 12 '22 14:10

daniestevez