TAGS :Viewed: 15 - Published at: a few seconds ago

[ Pycharm does not auto-create documentation stubs ]

I'm not sure why this is happening on this computer; it's never happened on any other. When I try to create a docstring for a function or class in pycharm, nothing happens. I.e.:

def foo(bar):
    """"""
    pass

Should insert a docstring upon pressing enter; instead it simply does:

def foo(bar):
    """
    """
    pass

Answer 1


This is a known bug and should be fixed in 2016.1.1.

One workaround, as described in the issue:

A workaround for this is to just """ before the code of your first line, then drop that code down a newline when it populates. Clunky, but it is a workaround for now.