如何阻止PyCharm填充文档字符串? [英] How to stop PyCharm from populating docstrings?

查看:437
本文介绍了如何阻止PyCharm填充文档字符串?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如果我使用三引号将方法字符串添加到方法中,只要在三引号后键入空格,PyCharm就会使用方法所采用的参数和返回值填充docstring,如下所示:

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:
    """ 

我搜索了PyCharm首选项docstring 和存根并关掉所有出现的东西,即使它似乎与这种特殊行为无关;我用Google搜索了高低,但无法弄清楚如何让它停止。有谁知道怎么样? (这是在PyCharm CE 3.4中)

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)

推荐答案

您需要将docstrings格式设置为Plain。它默认为reStructuredText,它提供了这些提示。

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

该设置可在项目设置中的Python Integrated Tools下找到。

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


  1. 文件>设置

  2. Python集成工具

  3. 文档字符串格式

这篇关于如何阻止PyCharm填充文档字符串?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆