{ "info": { "author": "Andy McKay", "author_email": "andym@mozilla.com", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Developers", "Natural Language :: English", "Operating System :: OS Independent" ], "description": "A script to detect that the import order matches Mozilla WebDev Python\nguidelines.\n\nExample::\n\n [baked] zamboni $ p ~/sandboxes/baked/baked.py lib/video/ffmpeg.py -p\n lib/video/ffmpeg.py:9: order wrong for check_output, subprocess, VideoBase\n --- /Users/andy/sandboxes/zamboni/lib/video/ffmpeg.py\t2014-05-23 16:11:56.000000000 -0700\n +++ /var/folders/15/3crpnr7j4sj75xynpsqkqbr00000gp/T/tmpXvc_Ml.py\t2014-05-23 16:12:11.000000000 -0700\n @@ -1,14 +1,14 @@\n import logging\n +import logging\n import re\n import tempfile\n\n from django.conf import settings\n\n +from django_statsd.clients import statsd\n from tower import ugettext as _\n\n -from django_statsd.clients import statsd\n from .utils import check_output, subprocess, VideoBase\n -import logging\n\nNotice that it detected that `logging` should be up at the top and\n`django_statsd` with the 3rd party imports.\n\nUsage::\n\n baked.py [filename] [filename..]\n\nFilename can be a glob. Or multiple filenames. For example::\n\n baked.py apps/*.py mkt/*.py\n\nBaked will also accept files being piped to it, for example::\n\n git diff-index HEAD^ --name-only | baked\n\nBaked loads a confg file as JSON. It will look in the following places for the file:\n\n* in the current and parent directories of the file being checked for\n ``.baked``\n* the current directory for ``.baked``\n* the users profile directory for ``.baked``\n\nFor an example see:\n\nhttps://gist.github.com/andymckay/5507339\n\nThe config file contains:\n\n* *order*: the list of orders of import ``blocks``. This allows you to group your imports into categories.\n* *fallback*: if a category is not found for lib, what should it fall back to, for most this will be ``local``.\n* *from_order*: a dictionary of sections with a boolean value for each section. If the value is false, then baked will not care that an ``import`` came before ``from``. Default is true for each category.\n* *modules*: a dictionary of categories and a list of modules. This allows baked to put each module in the category.\n\nIf you'd like to exclude an import from baked add the comment ``#NOQA``.\n\nGuidelines:\n\nhttp://mozweb.readthedocs.org/en/latest/coding.html#import-statements\n\nWith one exception, we ignore that imports should be ordered ``CONSTANT``,\n``Class``, ``var``. Just sort by alpha, case insensitive. That's easier for\neveryone to parse.\n\nConfig params:\n\n* ``-i`` change the file in place, but note that it doesn't fix the order of\n imports on the same line, for example: ``from foo import XX, bar`` is raised\n as a warning, but the order of ``XX`` and ``bar`` is not fixed.\n* ``-p``: print the diff that baked has calculated\n\nChanges\n-------\n\n0.2.1: lower case import names, so ``import StringIO`` comes after ``import\n os`` for example\n\n0.2: Is a backwards incompatible change, it focuses on generating diffs which\n is a lot easier to read than some rules. For imports statements on one\n line which are out of order, it still prints the import order and\n doesn't try to fix it up.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/andymckay/baked", "keywords": null, "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "baked", "package_url": "https://pypi.org/project/baked/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/baked/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/andymckay/baked" }, "release_url": "https://pypi.org/project/baked/0.2.5/", "requires_dist": null, "requires_python": null, "summary": "Import order detection", "version": "0.2.5" }, "last_serial": 1511528, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "6b92fb88fdf563b72364311db870c2c3", "sha256": "98383b8d269cd444c0d086bbfec215be96e0b76898964001fa7b7aa65dd9c06e" }, "downloads": -1, "filename": "baked-0.1.tar.gz", "has_sig": false, "md5_digest": "6b92fb88fdf563b72364311db870c2c3", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2597, "upload_time": "2013-05-03T06:02:03", "url": "https://files.pythonhosted.org/packages/89/32/8c7915f4d104c1a5e1654493c932851ffce07afd22a7a6f6e2fb93d80911/baked-0.1.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "ba2002495c5b2ac5ff9dec708574f7d5", "sha256": "8dad9c26c6926211d34dfbf7300d27895cb6637f8d1c720021a3038662b2c9c0" }, "downloads": -1, "filename": "baked-0.1.1.tar.gz", "has_sig": false, "md5_digest": "ba2002495c5b2ac5ff9dec708574f7d5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2596, "upload_time": "2013-05-03T06:17:50", "url": "https://files.pythonhosted.org/packages/28/8d/5b177349618b4a6d18b298ec0239e9eaa806ce043c07381e831e662957e4/baked-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "4c2cb22289b538728bfbd9d911d22177", "sha256": "3eb1919ac6cab44a2c37d40e774cb4bc10cc99de5741eeffa59ee412375af0cb" }, "downloads": -1, "filename": "baked-0.1.2.tar.gz", "has_sig": false, "md5_digest": "4c2cb22289b538728bfbd9d911d22177", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3003, "upload_time": "2013-05-03T22:02:44", "url": "https://files.pythonhosted.org/packages/ac/b6/d1b7c8b27c5af5674993e193729cd73bfde57713f72ffcc513ff2de26958/baked-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "144bb40f685bbfc960a88e09ccf343cf", "sha256": "1e754804f977d4e3caa6d7d9435a5169085ef5202e5a3596f48e380a5b2bf22a" }, "downloads": -1, "filename": "baked-0.1.3.tar.gz", "has_sig": false, "md5_digest": "144bb40f685bbfc960a88e09ccf343cf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3240, "upload_time": "2013-05-03T22:09:21", "url": "https://files.pythonhosted.org/packages/d4/d6/9d63ab2ee9c31c2764f31ba7248c5bf35e0ebaea77078494011a6e71b5e9/baked-0.1.3.tar.gz" } ], "0.1.3.2": [ { "comment_text": "", "digests": { "md5": "62ac241e368a6402c8886239557d49b9", "sha256": "8723df6c5846d995c9c955e82c94bcc84585cbd14988196e5ff3c433d94f587d" }, "downloads": -1, "filename": "baked-0.1.3.2.tar.gz", "has_sig": false, "md5_digest": "62ac241e368a6402c8886239557d49b9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3965, "upload_time": "2013-05-08T18:03:44", "url": "https://files.pythonhosted.org/packages/f9/16/697ab208a60b55a6e94ecec3e3e25f628bb28599e6975943cdc89aa5d51a/baked-0.1.3.2.tar.gz" } ], "0.1.3.3": [ { "comment_text": "", "digests": { "md5": "608b1d5b70c73dfacf65a93c6ea459e5", "sha256": "e1a6c7e554e7f2eac406eec5153bb89ca24d6ad91bb7d5b1f415ada933738f2a" }, "downloads": -1, "filename": "baked-0.1.3.3.tar.gz", "has_sig": false, "md5_digest": "608b1d5b70c73dfacf65a93c6ea459e5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4666, "upload_time": "2013-05-10T23:29:09", "url": "https://files.pythonhosted.org/packages/e7/ba/d8c5f75528708965285cb3e2ba445870e52eec2cc5b867e3710ef6058fc9/baked-0.1.3.3.tar.gz" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "145fb044fa71dcc2fa743f786584d45b", "sha256": "a44808c3c7d0bec82f05f5b727a62d64b6fc0569b6f1170fcb718b89f2c26e05" }, "downloads": -1, "filename": "baked-0.1.4.tar.gz", "has_sig": false, "md5_digest": "145fb044fa71dcc2fa743f786584d45b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4718, "upload_time": "2014-02-24T21:47:12", "url": "https://files.pythonhosted.org/packages/e8/10/2123174016dc70ad32de48e92ab705dfa72608d5745158c7e55f6478d9df/baked-0.1.4.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "ee65448b626193cf47fcc6fdc33490f9", "sha256": "16ee26ad4d7f38168a87befd3b422bc9c143bef200393b9fad7053ade66fe2f8" }, "downloads": -1, "filename": "baked-0.2.tar.gz", "has_sig": false, "md5_digest": "ee65448b626193cf47fcc6fdc33490f9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5956, "upload_time": "2014-05-23T23:17:31", "url": "https://files.pythonhosted.org/packages/54/d7/ac554c5ce3f888658c6a7a7d861eb637f6d6529d0ea41d5babaf825b2fcd/baked-0.2.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "1cf8f767b76c422f1da7b58465586f23", "sha256": "dcc0360385eb72a92e608007304a014bbc6f5fd6557b20acfae1508716eb5547" }, "downloads": -1, "filename": "baked-0.2.1.tar.gz", "has_sig": false, "md5_digest": "1cf8f767b76c422f1da7b58465586f23", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6082, "upload_time": "2014-05-26T16:30:58", "url": "https://files.pythonhosted.org/packages/66/c6/89f52e78508cda86ed99aeb314a5623d0646ec3b65561fb192b9f54d730c/baked-0.2.1.tar.gz" } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "57ce8d8481f14dc55f7fe1c36d573312", "sha256": "bb6057fea8da5e94cb5948c052a4e714ca7bd2ee9e72ddd73893e1183344584b" }, "downloads": -1, "filename": "baked-0.2.2.tar.gz", "has_sig": false, "md5_digest": "57ce8d8481f14dc55f7fe1c36d573312", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6100, "upload_time": "2015-04-13T16:57:01", "url": "https://files.pythonhosted.org/packages/59/0c/b3c23e94a66281030e9431ff32422de0d28da3560a4ac0cb0f2a7f24fb46/baked-0.2.2.tar.gz" } ], "0.2.3": [ { "comment_text": "", "digests": { "md5": "0f91f11f3193f5d61f4a8ceb4edf9b82", "sha256": "b7d13b0b4f9d1685dd9ef8cfb185e9af7b28033a375ab0da786504036c321e7d" }, "downloads": -1, "filename": "baked-0.2.3.tar.gz", "has_sig": false, "md5_digest": "0f91f11f3193f5d61f4a8ceb4edf9b82", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6129, "upload_time": "2015-04-13T17:43:56", "url": "https://files.pythonhosted.org/packages/3f/95/c35d870a6d08172b6d327a9b92d1f7d6a0c672fea76c7193cc7dde39ef5e/baked-0.2.3.tar.gz" } ], "0.2.4": [ { "comment_text": "", "digests": { "md5": "fc052a2f4e621516962366ac5499ef26", "sha256": "64801f5dc3503df72af66710657ba19e5730e52ac4eab2c4d6b3744aca4bd7e4" }, "downloads": -1, "filename": "baked-0.2.4.tar.gz", "has_sig": false, "md5_digest": "fc052a2f4e621516962366ac5499ef26", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6137, "upload_time": "2015-04-13T18:02:32", "url": "https://files.pythonhosted.org/packages/77/e4/be03904071133dd79c132defdd1cbdd914b3c3294f1aa399f073f0c8e894/baked-0.2.4.tar.gz" } ], "0.2.5": [ { "comment_text": "", "digests": { "md5": "4abdbab62364c3a838b42277f2550af0", "sha256": "77c92aaaf5d78b0a3a8c34fed1c62292082ab52e261c4f37d61d92e0c3b7bf2f" }, "downloads": -1, "filename": "baked-0.2.5.tar.gz", "has_sig": false, "md5_digest": "4abdbab62364c3a838b42277f2550af0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6154, "upload_time": "2015-04-19T15:04:49", "url": "https://files.pythonhosted.org/packages/e8/40/6bbfd5bf5628f40607fe82c4315d1eaeaad91c4e638256cfdae02c8adcc8/baked-0.2.5.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "4abdbab62364c3a838b42277f2550af0", "sha256": "77c92aaaf5d78b0a3a8c34fed1c62292082ab52e261c4f37d61d92e0c3b7bf2f" }, "downloads": -1, "filename": "baked-0.2.5.tar.gz", "has_sig": false, "md5_digest": "4abdbab62364c3a838b42277f2550af0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 6154, "upload_time": "2015-04-19T15:04:49", "url": "https://files.pythonhosted.org/packages/e8/40/6bbfd5bf5628f40607fe82c4315d1eaeaad91c4e638256cfdae02c8adcc8/baked-0.2.5.tar.gz" } ] }