{"id":85764,"date":"2020-05-15T12:42:46","date_gmt":"2020-05-15T04:42:46","guid":{"rendered":"http:\/\/4563.org\/?p=85764"},"modified":"2020-05-15T12:42:46","modified_gmt":"2020-05-15T04:42:46","slug":"%e5%8f%88%e8%a2%ab-python-%e5%b0%be%e9%80%97%e5%8f%b7%e5%88%9b%e5%bb%ba-tuple-%e5%9d%91%e4%ba%86%e4%b8%80%e6%ac%a1","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=85764","title":{"rendered":"\u53c8\u88ab Python \u5c3e\u9017\u53f7\u521b\u5efa tuple \u5751\u4e86\u4e00\u6b21"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  \u53c8\u88ab Python \u5c3e\u9017\u53f7\u521b\u5efa tuple \u5751\u4e86\u4e00\u6b21               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : guyskk0x0 <\/span>  <span><i><\/i> 2<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\"> <\/p>\n<p>\u8f66\u7978\u73b0\u573a\uff1a<\/p>\n<ul>\n<li>https:\/\/github.com\/anyant\/rssant\/commit\/5b35f7a216597a29d79f58702cf405c520bead96<\/li>\n<\/ul>\n<p>\u5386\u53f2\u8bb0\u5f55\uff1a<\/p>\n<ul>\n<li>https:\/\/origin.v2ex.com\/t\/565506<\/li>\n<li>https:\/\/blog.guyskk.com\/notes\/\u4e0d\u8981 Copy \u4ee3\u7801-Python \u5c3e\u9017\u53f7\u5bfc\u81f4\u7684 Bug<\/li>\n<\/ul>\n<p>\u89e3\u51b3\u65b9\u6848\uff1apylint \u6216 pre-commit<\/p>\n<ul>\n<li>https:\/\/stackoverflow.com\/questions\/44700951\/unintentional-trailing-comma-that-creates-a-tuple<\/li>\n<li>https:\/\/github.com\/Trim21\/find-trailing-comma<\/li>\n<\/ul><\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>10<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"1515717\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : ClericPy <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u4e94\u5e74\u524d\u72af\u8fc7, \u540e\u6765\u5c31\u518d\u4e5f\u6ca1\u72af\u8fc7&#8230; \u518d\u540e\u6765 typing hints \u4e00\u5927\u7247\u901a\u7ea2&#8230;                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1515718\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : guyskk0x0 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @ClericPy type hints \u4e5f\u4e0d\u9519\uff0c\u53ea\u662f\u4ee3\u7801\u8981\u5b8c\u5168\u5408\u683c\u6709\u4e9b\u9ebb\u70e6                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1515719\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : frostming <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u6211\u7ed9 pycodestyle \uff08 flake8 \u4f7f\u7528\u7684\u89c4\u5219\u5e93\uff09\u4e5f\u63d0\u4e86 issue https:\/\/github.com\/PyCQA\/pycodestyle\/issues\/857<br \/>\u4f46\u597d\u50cf\u4e0d\u6253\u7b97\u4fee\u7684\u6837\u5b50                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1515720\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : guyskk0x0 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @frostming \u5148\u70b9\u4e2a                                                             <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1515721\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : ClericPy <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @guyskk0x0 #2<\/p>\n<p>\u5b8c\u5168\u5408\u683c\u592a\u96be\u4e86&#8230; \u6700\u540e\u5728 mypy \u91cc\u6392\u9664\u4e86\u4e00\u5927\u4e9b&#8230;<\/p>\n<p>&#8220;python.linting.mypyArgs&#8221;: [<br \/> &#8220;&#8211;ignore-missing-imports&#8221;,<br \/> &#8220;&#8211;follow-imports=silent&#8221;,<br \/> &#8220;&#8211;show-column-numbers&#8221;,<br \/> &#8220;&#8211;no-strict-optional&#8221;,<br \/> ],<\/p>\n<p>\u6342\u8138, \u5f3a\u8feb\u75c7\u770b\u4e0d\u5f97\u6ee1\u6c5f\u7ea2, \u6240\u4ee5\u81ea\u6233\u53cc\u773c\u5c31\u770b\u4e0d\u89c1\u4e86                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1515722\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : RedisMasterNode <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @ClericPy \u4e3a\u4ec0\u4e48\u8981 ignore missing imports&#8230;                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1515723\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : guyskk0x0 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @ClericPy \u540c\u611f\u3002\u6211\u521a\u5f00\u542f pylint\uff0c\u53d1\u73b0\u4e00\u5927\u7247\u4e94\u989c\u516d\u8272&#8230; \u8fd9\u597d\u50cf\u5c31\u662f\u6211\u6ca1\u7528 pylint \u548c mypy \u7684\u539f\u56e0                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1515724\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : ClericPy <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @RedisMasterNode #6 \u8fd8\u771f\u60f3\u4e0d\u8d77\u6765\u4e86&#8230; \u4f3c\u4e4e\u662f\u6709\u4e9b debug \u73af\u5883\u4ee5\u53ca\u6709\u4e9b\u5e93\u91cc\u9762\u7528\u7684\u662f from .tasks import * \u5bfc\u81f4\u5168\u5c4f\u98d8\u7ea2, \u6211\u7528\u7684 VSCODE \u5f00\u4e86 Error Lens, \u90a3\u7ea2\u7684\u5413\u4eba<\/p>\n<p>@guyskk0x0 #7 \u6682\u65f6\u7528\u7684 flake8, \u5185\u7f6e\u5e93\u91cc\u9762 asyncio.__init__.py \u91cc\u4e0a\u6765\u5c31\u662f\u4e00\u53e5 # flake8: noqa, \u6211\u7ed9\u5b83\u53bb\u6389\u53ef\u4ee5\u53c2\u8003\u4e0b\u6709\u591a\u7ea2&#8230;<\/p>\n<p>https:\/\/i.loli.net\/2020\/05\/11\/juAQVL9HGXMY35q.png<\/p>\n<p>![[email&#160;protected][email&#160;protected]_U8_Q5192.png]( https:\/\/i.loli.net\/2020\/05\/11\/juAQVL9HGXMY35q.png)                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1515725\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : Trim21 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u539f\u6765\u6211\u5199\u7684\u8fd9\u4e2a\u5c0f\u73a9\u827a\u9664\u4e86\u6211\u81ea\u5df1\u8fd8\u6709\u4eba\u7528&#8230;                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"1515726\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : frostming <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             pylint \u592a\u5570\u55e6\u4e86\uff0c\u6211\u57fa\u672c\u53ea\u7528 flake8\uff0c\u7136\u800c Flake8 \u4e5f\u4e0d\u4fee\u8fd9\u4e2a<\/p>\n<p>@Trim21 \u53d1\u73b0\u4f60\u4e5f\u5728\u6211\u63d0\u7684 issue \u91cc\u9762\u51fa\u73b0\u4e86\uff0c\u5708\u5b50\u592a\u5c0f\u4e86                                                            <\/p><\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>\u53c8\u88ab Python \u5c3e\u9017\u53f7\u521b\u5efa t&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/85764"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=85764"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/85764\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=85764"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=85764"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=85764"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}