Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Pycharm does not auto-create documentation stubs

Tags:

python

pycharm

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
like image 596
eriophora Avatar asked Mar 29 '16 19:03

eriophora


1 Answers

In order to solve this problem, I had to go into Settings -> Tools -> Python Integrated Tools and reset the docstring format. I did so by changing Docstring format from Epytext to Plain, clicking Apply, then changing it back to Epytext again and applying the change, and now everything works.

PyCharm version: 2021.1.2 (Community Edition)

like image 92
asymmetryFan Avatar answered Oct 21 '22 15:10

asymmetryFan