{"id":3109,"date":"2021-02-11T01:09:24","date_gmt":"2021-02-10T17:09:24","guid":{"rendered":"http:\/\/blog.ywdevops.cn\/?p=3109"},"modified":"2023-10-17T16:01:43","modified_gmt":"2023-10-17T08:01:43","slug":"python-11","status":"publish","type":"post","link":"https:\/\/blog.ywdevops.cn\/index.php\/2021\/02\/11\/python-11\/","title":{"rendered":"python\u4e2dpep8\u7f16\u7801\u89c4\u8303\u4ee5\u53ca\u68c0\u6d4b"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">PEP8\u7f16\u7801\u89c4\u8303\uff0c\u5982\u56fe\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"411\" src=\"http:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/02\/20-1024x411.png\" alt=\"\" class=\"wp-image-3110\" srcset=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/02\/20-1024x411.png 1024w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/02\/20-300x120.png 300w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/02\/20-768x308.png 768w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/02\/20-600x241.png 600w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/02\/20.png 1236w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u547d\u540d\u89c4\u8303\uff0c\u5982\u56fe\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"402\" src=\"http:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/02\/19-1-1024x402.png\" alt=\"\" class=\"wp-image-3113\" srcset=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/02\/19-1-1024x402.png 1024w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/02\/19-1-300x118.png 300w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/02\/19-1-768x302.png 768w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/02\/19-1-600x236.png 600w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2021\/02\/19-1.png 1227w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u5982\u4f55\u68c0\u6d4b\u7f16\u7801\u662f\u5426\u7b26\u5408pep8\u7f16\u7801\u89c4\u8303\uff1f<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">pep8\u5df2\u7ecf\u88ab\u91cd\u547d\u540d\u4e3apycodestyle\uff0c\u56e0\u6b64\u6211\u4eec\u53ea\u9700\u8981\u5b89\u88c5pycodestyle\uff0c\u5e76\u4f7f\u7528\u5176\u68c0\u6d4b\u5373\u53ef<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">1\u3001\u5b89\u88c5pycodestyle<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>pip install pycodestyle<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"695\" height=\"163\" src=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2023\/10\/7-3.png\" alt=\"\" class=\"wp-image-15179\" srcset=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2023\/10\/7-3.png 695w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2023\/10\/7-3-300x70.png 300w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2023\/10\/7-3-600x141.png 600w\" sizes=\"auto, (max-width: 695px) 100vw, 695px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">2\u3001\u6267\u884c\u5982\u4e0b\u547d\u4ee4\u5bf9\u4ee3\u7801\u8fdb\u884c\u68c0\u67e5\uff0c\u5982\u4e0b\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>pycodestyle --first b.py<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"696\" height=\"151\" src=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2023\/10\/8-3.png\" alt=\"\" class=\"wp-image-15180\" srcset=\"https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2023\/10\/8-3.png 696w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2023\/10\/8-3-300x65.png 300w, https:\/\/blog.ywdevops.cn\/wp-content\/uploads\/2023\/10\/8-3-600x130.png 600w\" sizes=\"auto, (max-width: 696px) 100vw, 696px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">\u4ece\u4e0a\u56fe\u63d0\u793a\u53ef\u4ee5\u770b\u51fa\uff0c\u663e\u793a\u7b2c10\u884c\u768413\u5217\u7684\u5192\u53f7\u540e\u9762\u4e0d\u80fd\u6709\u7a7a\u683c\uff0c\u6839\u636e\u4e0a\u9762\u63d0\u793a\u9010\u6761\u89e3\u51b3\u5373\u53ef<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u5e38\u89c1\u7684pep8\u4e2d\u7684\u63d0\u793a\u89c4\u5219\u5982\u4e0b\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>E304 blank lines found after function decorator: \u4e00\u822c\u662fflask\u4e2d\u51fd\u6570\u4e0e@\u88c5\u9970\u5668\u4e4b\u95f4\u6709\u7a7a\u884c\nE305 expected 2 blank lines after class or function definition, found 1:\u6b64\u884c\u524d\u9762\u5e94\u8be5\u67092\u4e2a\u7a7a\u884c\uff0c\u5b9e\u9645\u53ea\u67091\u4e2a\nE231 missing whitespace after ',': \u9017\u53f7\u540e\u9762\u7f3a\u5c11\u4e00\u4e2a\u7a7a\u683c<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>PEP8\u7f16\u7801\u89c4\u8303\uff0c\u5982\u56fe\uff1a \u547d\u540d\u89c4\u8303\uff0c\u5982\u56fe\uff1a \u5982\u4f55\u68c0\u6d4b\u7f16\u7801\u662f\u5426\u7b26\u5408pep8\u7f16\u7801\u89c4\u8303\uff1f pep8\u5df2\u7ecf\u88ab\u91cd\u547d\u540d\u4e3apy [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":3111,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[38,29],"tags":[],"class_list":["post-3109","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-python","category-yunwei"],"blocksy_meta":{"styles_descriptor":{"styles":{"desktop":"","tablet":"","mobile":""},"google_fonts":[],"version":8}},"_links":{"self":[{"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/posts\/3109","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/comments?post=3109"}],"version-history":[{"count":8,"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/posts\/3109\/revisions"}],"predecessor-version":[{"id":15189,"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/posts\/3109\/revisions\/15189"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/media\/3111"}],"wp:attachment":[{"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/media?parent=3109"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/categories?post=3109"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.ywdevops.cn\/index.php\/wp-json\/wp\/v2\/tags?post=3109"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}