{ "info": { "author": "M Stoeckl", "author_email": "mstoeckl@u.rochester.edu", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: POSIX :: Linux", "Programming Language :: C", "Programming Language :: Python :: 3", "Topic :: Utilities" ], "description": "# PFA (Python Fast Autoformat)\n\nAn autoformatter should be three things:\n\n* **Fast**: Run quickly so that you can afford to run the autoformatter on a large code base without ever having to wait for the autoformat to complete.\n* **Consistent**: Running the autoformatter a second time won't change the output. Code will run the same before and after the autoformatter is run. Trivial whitespace changes will be reverted.\n* **Pretty**: Output looks nice and preferably follows PEP8. \n\nPFA chooses to be *Fast* and *Consistent*, but sacrifices *Pretty* output in favor of speed.\n\n## Installation and Usage\n\nTo create the executable file `pfa`, run\n\n make\n\nAfterwards you can copy it into `PATH`, say to `/usr/bin` or `~/bin/`.\n\nThere are two ways to run the program. If the executable file name does not end in \"i\", i.e. with\n\n pfa that_python_script.py\n\nthen the formatted file will be dumped to standard output. If you make a symlink from `pfa` to `pfai` and run the latter like\n\n pfai that_python_script.py scriptus_secundus.py\n \nthen all files listed as arguments will be formatted in place.\n\n## FAQ\n\n* **Why is PFA written in C?** The startup time for the Python interpreter is often longer than it takes to run `pfa` on a 2000 line file.\n\n* **How fast is it?** The other popular Python formatters are `yapf` and `autopep8`. Formatting about 120KB of python code in place for the second time in a row with the following commands,\n\n yapf -i bx.py\n autopep8 -i bx.py\n pfai bx.py\n\n one finds that `yapf` takes 14.0 seconds; `autopep8` takes 1.8 seconds; and `pfai` completes in 0.020 seconds, less than the time it takes to press Enter.\n\n* **I have a change to contribute. Will it be accepted?**: Yes, as long as `pfa` still runs in O(n) for even pathological input.\n", "description_content_type": "", "docs_url": null, "download_url": "https://github.com/mstoeckl/python-fast-autoformat/archive/0.4.tar.gz", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/mstoeckl/python-fast-autoformat", "keywords": "python", "license": "", "maintainer": "", "maintainer_email": "", "name": "pfa", "package_url": "https://pypi.org/project/pfa/", "platform": "", "project_url": "https://pypi.org/project/pfa/", "project_urls": { "Download": "https://github.com/mstoeckl/python-fast-autoformat/archive/0.4.tar.gz", "Homepage": "https://github.com/mstoeckl/python-fast-autoformat" }, "release_url": "https://pypi.org/project/pfa/0.4/", "requires_dist": null, "requires_python": "", "summary": "Very fast and consistent (if ugly) autoformatting for Python", "version": "0.4" }, "last_serial": 3981224, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "094bcc80e4665f281699d1fd69ee7f6a", "sha256": "3e02284efb3b2532812b5375b7682bd2eb5c367a3323d67c8f6561449e082fbc" }, "downloads": -1, "filename": "pfa-0.1.tar.gz", "has_sig": false, "md5_digest": "094bcc80e4665f281699d1fd69ee7f6a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17440, "upload_time": "2017-08-12T02:45:33", "url": "https://files.pythonhosted.org/packages/14/21/f6e9971294f8cd99ca07b5d18fb2cd62b3e8352a0e121f6aa9096380f7c6/pfa-0.1.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "19b3d5a0fa3a91317bdce4afada56f0d", "sha256": "6b6aa3e768d0c70ce0483f1c739a97ee5cf664172fbed341a6b197fc82acf932" }, "downloads": -1, "filename": "pfa-0.2.tar.gz", "has_sig": false, "md5_digest": "19b3d5a0fa3a91317bdce4afada56f0d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18400, "upload_time": "2018-03-10T01:02:23", "url": "https://files.pythonhosted.org/packages/11/d7/9965602ca37150a4d45760de33988bddd5532c39f523d034968a303c25a3/pfa-0.2.tar.gz" } ], "0.3": [ { "comment_text": "", "digests": { "md5": "972740a8bee579252f7ffe58e9e2fd06", "sha256": "a051a31c6881605f939402c1375a0b73236ca4f9e4304456cf73dca98f18d77f" }, "downloads": -1, "filename": "pfa-0.3.tar.gz", "has_sig": false, "md5_digest": "972740a8bee579252f7ffe58e9e2fd06", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18262, "upload_time": "2018-04-13T20:23:48", "url": "https://files.pythonhosted.org/packages/29/7a/631fdc6e6db8dd8cadfdfa9b6761b47d1055216d4f0d91d2dbd6efb043ab/pfa-0.3.tar.gz" } ], "0.4": [ { "comment_text": "", "digests": { "md5": "03861e3d9f2696e7587fe1457dbe1f8d", "sha256": "33cae38ccec9af912c9018a0456636a0467d2df8043dd6b0d22d113f31b83bf7" }, "downloads": -1, "filename": "pfa-0.4.tar.gz", "has_sig": false, "md5_digest": "03861e3d9f2696e7587fe1457dbe1f8d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18231, "upload_time": "2018-06-20T12:39:43", "url": "https://files.pythonhosted.org/packages/c1/ae/0a32a94d7ebd8c2b0f6053e7a620090e0f1187edf1206a3bd30feda055ea/pfa-0.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "03861e3d9f2696e7587fe1457dbe1f8d", "sha256": "33cae38ccec9af912c9018a0456636a0467d2df8043dd6b0d22d113f31b83bf7" }, "downloads": -1, "filename": "pfa-0.4.tar.gz", "has_sig": false, "md5_digest": "03861e3d9f2696e7587fe1457dbe1f8d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 18231, "upload_time": "2018-06-20T12:39:43", "url": "https://files.pythonhosted.org/packages/c1/ae/0a32a94d7ebd8c2b0f6053e7a620090e0f1187edf1206a3bd30feda055ea/pfa-0.4.tar.gz" } ] }