1.安装pylint
pip install pylint
2.pylint集成到pycharm
Setting---->Tools---->External Tools
Program: C:\Python27\Scripts\pylint.exe
Parameters:-rn --msg-template="{abspath}:{line}: [{msg_id}({symbol}), {obj}] {msg}" $FilePath$
Workingdirectory: $FileDir$
3.生成pylintrc文件
防止出现“Noconfig file found, using default configuration”问题
pylint --generate-rcfile > pylintrc
4.使用pylint检查代码