{ "info": { "author": "Ted Kaemming, Disqus", "author_email": "ted@disqus.com", "bugtrack_url": null, "classifiers": [], "description": "importformatter\n~~~~~~~~~~~~~~~\n\nGroups, lexicographically sorts and formats import statement into the three\ngroups as defined by PEP8 (standard library, third-party packages, current\npackage/application.)\n\nImports from the same package are collapsed into a single statement, and\nmultiple identifiers from the same packages are grouped using parentheses and\nseparated by a newline.\n\nUsage\n=====\n\n::\n\n Usage: format-imports.py [options]\n\n Groups, sorts, and formats import statements.\n\n Options:\n -h, --help show this help message and exit\n -a APPLICATION, --application=APPLICATION\n -s STDLIB_FILES, --stdlib-file=STDLIB_FILES\n File(s) containing additional module names to add to\n the standard library set.\n\nThe script accepts input via ``stdin``, and outputs the formatted code via ``stdout``.\n\nExample\n-------\n\nFor the given ``bad.py``:\n\n.. code:: python\n\n import sys\n\n import foo\n import bar as other\n from baz import (\n package,\n package3,\n )\n from module import package3 as package4\n from baz import package2, package1\n\n import application\n from application.utils import memoize\n from application.models import User\n from application.models import Place\n\n import os\n\nThe output of ``format-imports.py -a application < bad.py`` will be:\n\n.. code:: python\n\n import os\n import sys\n\n import bar as other\n import foo\n from baz import (\n package,\n package1,\n package2,\n package3,\n )\n from module import package3 as package4\n\n import application\n from application.models import (\n Place,\n User,\n )\n from application.utils import memoize\n\nUsage with Vim\n--------------\n\nSelect a chunk of text in visual mode, then invoke the ``format-imports.py`` script against the chunk with::\n\n :'<,'>!format-imports.py -a ", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "UNKNOWN", "keywords": null, "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "importformatter", "package_url": "https://pypi.org/project/importformatter/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/importformatter/", "project_urls": { "Download": "UNKNOWN", "Homepage": "UNKNOWN" }, "release_url": "https://pypi.org/project/importformatter/0.1.3/", "requires_dist": null, "requires_python": null, "summary": "Groups, sorts, and formats import statements.", "version": "0.1.3" }, "last_serial": 913257, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "0fe5ed845c97fe455c99c989b85072e1", "sha256": "606ea40c21e6d80acb3ed889e4e1391b36bdd5d1e3b705d04b1530fe92fd3abf" }, "downloads": -1, "filename": "importformatter-0.1.0.tar.gz", "has_sig": false, "md5_digest": "0fe5ed845c97fe455c99c989b85072e1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2037, "upload_time": "2013-10-31T18:56:16", "url": "https://files.pythonhosted.org/packages/aa/1c/0954e954c92ffa1ebdc13d687f2fbb34d8ae03adb8202c30019ee29ead14/importformatter-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "8cb5aa5ca153e0d249e12b6513e3cbe0", "sha256": "74fd9a0f7f2d648cd964bd9f3415f0437c013b43bdefd85ccd74ba5431c82487" }, "downloads": -1, "filename": "importformatter-0.1.1.tar.gz", "has_sig": false, "md5_digest": "8cb5aa5ca153e0d249e12b6513e3cbe0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3950, "upload_time": "2013-10-31T19:00:24", "url": "https://files.pythonhosted.org/packages/9e/90/db377964dd51fb0e00f6d443ae6d7debf71dbd29200a9894f9e8900f5d01/importformatter-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "71528f6312ba983c84e185f574f03b8f", "sha256": "5c20284d2e12203bab00720f8ed4e259ed30a082ecef6a2fe345cc5417f4d68e" }, "downloads": -1, "filename": "importformatter-0.1.2.tar.gz", "has_sig": false, "md5_digest": "71528f6312ba983c84e185f574f03b8f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4141, "upload_time": "2013-10-31T19:01:19", "url": "https://files.pythonhosted.org/packages/7a/e9/b458f6f79735012bb2175521fa3bf03e27d53c7ad69f5322b0bb8bfa40d0/importformatter-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "8e3fdc764d9993595c29a49f73c1d627", "sha256": "716fb335f5205d93d03794b8a15e6137c9b79e702230007b6e68bbfbdb5dd883" }, "downloads": -1, "filename": "importformatter-0.1.3.tar.gz", "has_sig": false, "md5_digest": "8e3fdc764d9993595c29a49f73c1d627", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4213, "upload_time": "2013-11-07T02:46:17", "url": "https://files.pythonhosted.org/packages/5e/3f/29a5dac334012d513126458d18d7cbd576604eebc7e8f5e097bd7232bf67/importformatter-0.1.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "8e3fdc764d9993595c29a49f73c1d627", "sha256": "716fb335f5205d93d03794b8a15e6137c9b79e702230007b6e68bbfbdb5dd883" }, "downloads": -1, "filename": "importformatter-0.1.3.tar.gz", "has_sig": false, "md5_digest": "8e3fdc764d9993595c29a49f73c1d627", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4213, "upload_time": "2013-11-07T02:46:17", "url": "https://files.pythonhosted.org/packages/5e/3f/29a5dac334012d513126458d18d7cbd576604eebc7e8f5e097bd7232bf67/importformatter-0.1.3.tar.gz" } ] }