1. 安装pylint
pip install pylint
2. 配置pylint
pycharm --settings--Tools--External Tools,新建
- program: python安装目录下scripts/pylint.exe
- Parameters: --output-format=parseable --disable=R -rn --msg-template="{abspath}:{line}: [{msg_id}({symbol}), {obj}] {msg}" $FilePath$
- working firectory: $FileDir$
3、使用pylint
4. pylint 错误解析
No space allowed before bracket :不允许在结束符之前有空格
Unnecessary parens after 'print' keyword :pyton2的print不应该加括号,忽略,为了兼容python3