How to stop PyCharm from populating docstrings?

拟墨画扇 提交于 2019-12-04 19:49:06

问题


If I add a docstring to a method using the triple-quote, as soon as I type a space after the triple-quote, PyCharm will populate the docstring with the parameters the method takes, and a return value, like so:

def fill_blank(self, direction):
    """ 
    :param direction: 
    :return:
    """ 

I've searched the PyCharm preferences for "docstring" and "stub" and turned off everything that shows up, even if it doesn't seem to pertain to this particular behavior; and I've googled high and low, but can't figure out how make it stop. Does anyone know how? (This is in PyCharm CE 3.4)


回答1:


You need to set the docstrings format to "Plain". It defaults to reStructuredText, which is giving you those hints.

The setting is found under Python Integrated Tools in your project settings.

  1. File > Settings
  2. Python Integrated Tools
  3. Docstring format



来源:https://stackoverflow.com/questions/25098863/how-to-stop-pycharm-from-populating-docstrings

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!