How do I stop PyCharm from autocompleting class methods?

我怕爱的太早我们不能终老 提交于 2021-01-27 02:44:41

问题


When I type:

def method(, PyCharm jumps in with def method(self):. I would like to disable this behaviour.


回答1:


The option is located at:

Settings > Editor > Smart Keys > Insert Self...

EDIT: As of pycharm 2017.1 it's under File -> Settings -> Editor -> General -> Smart Keys




回答2:


In PyCharm 2017.1

File -> Settings -> Editor -> General -> Smart Keys -> "Insert 'self' when defining a method"




回答3:


Go to File > Settings (or Ctrl+Alt+S) > [IDE Settings] > Editor > Code Completion.

The "Autopopup code completion" setting will determine if the popup opens automatically. Below it, the "Insert selected variant by typing dot, space, etc." is likely the setting you want to turn off.



来源:https://stackoverflow.com/questions/23432543/how-do-i-stop-pycharm-from-autocompleting-class-methods

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