{"id":162627,"date":"2019-11-26T12:00:20","date_gmt":"2019-11-26T04:00:20","guid":{"rendered":"https:\/\/gulass.cn\/?p=162627"},"modified":"2019-10-28T08:59:16","modified_gmt":"2019-10-28T00:59:16","slug":"pylint-python-linux","status":"publish","type":"post","link":"https:\/\/gulass.cn\/pylint-python-linux.html","title":{"rendered":"Pylint\uff1a\u66f4\u9ad8\u5c42\u7ea7\u7684 Python \u6837\u5f0f\u5f3a\u5236\u7a0b\u5e8f"},"content":{"rendered":"
\u5bfc\u8bfb<\/td>\n | \u5f53\u4f60\u60f3\u8981\u4e89\u8bba\u4ee3\u7801\u590d\u6742\u6027\u65f6\uff0cPylint \u662f\u4f60\u7684\u670b\u53cb\u3002Pylint \u662f\u66f4\u9ad8\u5c42\u7ea7\u7684 Python \u6837\u5f0f\u5f3a\u5236\u7a0b\u5e8f\u3002\u800c flake8 \u548c black \u68c0\u67e5\u7684\u662f\u201c\u672c\u5730\u201d\u6837\u5f0f\uff1a\u6362\u884c\u4f4d\u7f6e\u3001\u6ce8\u91ca\u7684\u683c\u5f0f\u3001\u53d1\u73b0\u6ce8\u91ca\u6389\u7684\u4ee3\u7801\u6216\u65e5\u5fd7\u683c\u5f0f\u4e2d\u7684\u9519\u8bef\u505a\u6cd5\u4e4b\u7c7b\u7684\u95ee\u9898\u3002<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n \u9ed8\u8ba4\u60c5\u51b5\u4e0b\uff0cPylint \u975e\u5e38\u6fc0\u8fdb\u3002\u5b83\u5c06\u5bf9\u6bcf\u6837\u4e1c\u897f\u90fd\u63d0\u4f9b\u4e25\u5389\u7684\u610f\u89c1\uff0c\u4ece\u68c0\u67e5\u662f\u5426\u5b9e\u9645\u5b9e\u73b0\u58f0\u660e\u7684\u63a5\u53e3\u5230\u91cd\u6784\u91cd\u590d\u4ee3\u7801\u7684\u53ef\u80fd\u6027\uff0c\u8fd9\u5bf9\u65b0\u7528\u6237\u6765\u8bf4\u53ef\u80fd\u4f1a\u5f88\u591a\u3002\u4e00\u79cd\u6e29\u548c\u5730\u5c06\u5176\u5f15\u5165\u9879\u76ee\u6216\u56e2\u961f\u7684\u65b9\u6cd5\u662f\u5148\u5173\u95ed\u6240\u6709\u68c0\u67e5\u5668\uff0c\u7136\u540e\u9010\u4e2a\u542f\u7528\u68c0\u67e5\u5668\u3002\u5982\u679c\u4f60\u5df2\u7ecf\u5728\u4f7f\u7528 flake8\u3001black \u548c mypy\uff0c\u8fd9\u5c24\u5176\u6709\u7528\uff1aPylint \u6709\u76f8\u5f53\u591a\u7684\u68c0\u67e5\u5668\u548c\u5b83\u4eec\u5728\u529f\u80fd\u4e0a\u91cd\u53e0\u3002<\/p>\n \u4f46\u662f\uff0cPylint \u72ec\u6709\u4e4b\u5904\u4e4b\u4e00\u662f\u80fd\u591f\u5f3a\u5236\u6267\u884c\u66f4\u9ad8\u7ea7\u522b\u7684\u95ee\u9898\uff1a\u4f8b\u5982\uff0c\u51fd\u6570\u7684\u884c\u6570\u6216\u8005\u7c7b\u4e2d\u65b9\u6cd5\u7684\u6570\u91cf\u3002<\/p>\n \u8fd9\u4e9b\u6570\u5b57\u53ef\u80fd\u56e0\u9879\u76ee\u800c\u5f02\uff0c\u5e76\u4e14\u53ef\u80fd\u53d6\u51b3\u4e8e\u5f00\u53d1\u56e2\u961f\u7684\u504f\u597d\u3002\u4f46\u662f\uff0c\u4e00\u65e6\u56e2\u961f\u5c31\u53c2\u6570\u8fbe\u6210\u4e00\u81f4\uff0c\u4f7f\u7528\u81ea\u52a8\u5de5\u5177\u5f3a\u5236\u5316\u8fd9\u4e9b\u53c2\u6570\u975e\u5e38\u6709\u7528\u3002\u8fd9\u662f Pylint \u95ea\u8000\u7684\u5730\u65b9\u3002<\/p>\n \u914d\u7f6e Pylint<\/strong><\/div>\n \u8981\u4ee5\u7a7a\u914d\u7f6e\u5f00\u59cb\uff0c\u8bf7\u5c06 .pylintrc \u8bbe\u7f6e\u4e3a<\/p>\n [MESSAGES CONTROL]\r\ndisable=all<\/pre>\n |