代码改变世界

pycharm配置pep8

2017-06-13 10:33  很大很老实  阅读(9773)  评论(0编辑  收藏  举报

 

可以使用外部工具,来检查代码是否符合pep8的风格:

1)下载 autopep8,这个简单,pip3 install pep8

2)在pychamr中配置:

  A)file-setting。。-tools--external tools,点击加号:

 

   B) 做如下配置:

 

  • Name:Autopep8(可以随便取)

  • Tools settings:

    • Programs:autopep8 (前提是你已经安装了哦)

    • Parameters:--in-place --aggressive --aggressive $FilePath$

    • Working directory:$ProjectFileDir$

  • 点击Output Files→添加,在对话框中的:Regular expression to match output中输入:$FILE_PATH$\:$LINE$\:$COLUMN$\:.*