{ "info": { "author": "Boying Xu", "author_email": "xuboying@gmail.com", "bugtrack_url": null, "classifiers": [ "Programming Language :: Python :: 2", "Programming Language :: Python :: 3" ], "description": "pythontidy2\n===========\n\n|Travis| |PyPI|\n\nUsage\n~~~~~\n\n.. code:: python\n\n python -m pythontidy2 [-t expandtabsize] script.py\n\nInstallation\n------------\n\n.. code:: python\n\n pip install pythontidy2\n\nDescription\n-----------\n\nLife is short, format the code automatically\n\n(\u4eba\u751f\u82e6\u77ed\uff0c\u81ea\u52a8\u6392\u7248)\n\nTidy python scripts\n\nEffect\n------\n\nConvert Tabs to Spaces(Tabs sized can be decide in argument -t, default\nis 4)\n\nDelete white spaces at end of line\n\nOwn thoughts about code format, some part are different from PEP8\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n\nPEP8: `Whitespace in Expressions and\nStatements `__ Not\ncompliant\n\nAlways add 1 white space between operators\n\nAlign dict and assignment statments like following\n\nFrom:\n~~~~~\n\n.. code:: python\n\n list = [1, 2, {\n 'Alicedefg': '2341',\n 'Beth' : \"c\",\n 'Cecil' : '3258',\n }, 4]\n\nTo:\n~~~\n\n.. code:: python\n\n list = [1, 2, {\n 'Alicedefg' : '2341',\n 'Beth' : \"c\",\n 'Cecil' : '3258',\n }, 4]\n\nFrom:\n~~~~~\n\n.. code:: python\n\n doc = \"\"\n long_variable = ((doc+' ') if doc else '')\n x = \"\"\n\nTo:\n~~~\n\n.. code:: python\n\n doc = \"\"\n long_variable = ((doc + ' ') if doc else '')\n x = \"\"\n\nLimitation\n----------\n\nOnly Windows(\\ *CRLF*) Linux/Modern OSX(\\ *LF*) end of line mark\nsupported\n\nDo not support classic Mac end of line mark(\\ *CR*)\n\nWidechar(Asian) in sorce code (as variable or dict Key) not tested\n\nVIM Integration\n---------------\n\nBelow example binds the tidy fucntion to F7\n\n.. code:: vim\n\n command -range=% -nargs=* TidyPython ,!python -m pythontidy2\n fun DoTidyPython()\n let Pos = line2byte( line( \".\" ) )\n :TidyPython\n exe \"goto \" . Pos\n endfun\n au Filetype python nmap :call DoTidyPython()\n au Filetype python imap :call DoTidyPython()\n au Filetype python vmap :TidyPython\n\nLicense\n-------\n\n**BSD**\n\n Copyright (c) 2016, Boying Xu All rights reserved.\n\n Redistribution and use in source and binary forms, with or without\n modification, are permitted provided that the following conditions\n are met:\n\n 1. Redistributions of source code must retain the above copyright\n notice, this list of conditions and the following disclaimer.\n\n 2. Redistributions in binary form must reproduce the above copyright\n notice, this list of conditions and the following disclaimer in\n the documentation and/or other materials provided with the\n distribution.\n\n 3. Neither the name of the copyright holder nor the names of its\n contributors may be used to endorse or promote products derived\n from this software without specific prior written permission.\n\n THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\n \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\n LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS\n FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE\n COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,\n INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,\n BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\n CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN\n ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n POSSIBILITY OF SUCH DAMAGE.\n\n.. |Travis| image:: https://img.shields.io/badge/pypi-0.1-blue.svg\n :target: https://pypi.python.org/pypi?:action=display&name=pythontidy2\n.. |PyPI| image:: https://img.shields.io/pypi/l/Django.svg\n :target: #", "description_content_type": null, "docs_url": null, "download_url": "https://github.com/xuboying/pythontidy2/releases/tag/0.1.9", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/xuboying/pythontidy2", "keywords": "utility", "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "pythontidy2", "package_url": "https://pypi.org/project/pythontidy2/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/pythontidy2/", "project_urls": { "Download": "https://github.com/xuboying/pythontidy2/releases/tag/0.1.9", "Homepage": "https://github.com/xuboying/pythontidy2" }, "release_url": "https://pypi.org/project/pythontidy2/0.1.9/", "requires_dist": null, "requires_python": null, "summary": "Tidy Python Script", "version": "0.1.9" }, "last_serial": 1969215, "releases": { "0.1.5": [ { "comment_text": "", "digests": { "md5": "ad418deac780d7efbdcb10d1c29a4978", "sha256": "fe072cc50af8d57b6efae0efaa08132d9c41f849d85284e019eb81a18cc821c3" }, "downloads": -1, "filename": "pythontidy2-0.1.5.zip", "has_sig": false, "md5_digest": "ad418deac780d7efbdcb10d1c29a4978", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4798, "upload_time": "2016-01-06T02:59:40", "url": "https://files.pythonhosted.org/packages/5a/24/f038e6eedf1326e6aca95444725e5173a2c15ad1beafb6f81c7256636d94/pythontidy2-0.1.5.zip" } ], "0.1.6": [ { "comment_text": "", "digests": { "md5": "62cc7b884a161fb236eca64c7ea8e766", "sha256": "0ba0a807235fac49371a0fd9de12b8945aa9476f7143c1e35ad615e95c2d5234" }, "downloads": -1, "filename": "pythontidy2-0.1.6.zip", "has_sig": false, "md5_digest": "62cc7b884a161fb236eca64c7ea8e766", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 9983, "upload_time": "2016-01-08T06:17:26", "url": "https://files.pythonhosted.org/packages/c1/6b/45c2177435c9444f5b15cb007f4ad9c6d54ab0f3d2b0e9be59dfd3ee11e2/pythontidy2-0.1.6.zip" } ], "0.1.7": [ { "comment_text": "", "digests": { "md5": "619c0755ff8c7890ebf957c787e16cb6", "sha256": "8a9f50fb0bbf65cc36c19ef7792f6319b42bcf5d7af78fecf663a8df87e451b7" }, "downloads": -1, "filename": "pythontidy2-0.1.7.zip", "has_sig": false, "md5_digest": "619c0755ff8c7890ebf957c787e16cb6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8222, "upload_time": "2016-01-08T07:33:05", "url": "https://files.pythonhosted.org/packages/e3/0a/c5eafcf1d3720c9b76b9463a5d06907a6b7162ab1caf79e78a3804bc5538/pythontidy2-0.1.7.zip" } ], "0.1.9": [ { "comment_text": "", "digests": { "md5": "8099515cb8515bf15ffe01f71f95db71", "sha256": "e0ec08101f4681f5c095de354b9b756db2c3203fed0db309349f3ae5259dc86e" }, "downloads": -1, "filename": "pythontidy2-0.1.9.zip", "has_sig": false, "md5_digest": "8099515cb8515bf15ffe01f71f95db71", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8228, "upload_time": "2016-02-22T07:56:05", "url": "https://files.pythonhosted.org/packages/82/3a/ea13c08714d9af5c36fdaf0b612397e922c6001d4f3b5cd8dde6bc738ad9/pythontidy2-0.1.9.zip" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "8099515cb8515bf15ffe01f71f95db71", "sha256": "e0ec08101f4681f5c095de354b9b756db2c3203fed0db309349f3ae5259dc86e" }, "downloads": -1, "filename": "pythontidy2-0.1.9.zip", "has_sig": false, "md5_digest": "8099515cb8515bf15ffe01f71f95db71", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8228, "upload_time": "2016-02-22T07:56:05", "url": "https://files.pythonhosted.org/packages/82/3a/ea13c08714d9af5c36fdaf0b612397e922c6001d4f3b5cd8dde6bc738ad9/pythontidy2-0.1.9.zip" } ] }