Welcome, guest | Sign In | My Account | Store | Cart

Notice! PyPM is being replaced with the ActiveState Platform, which enhances PyPM’s build and deploy capabilities. Create your free Platform account to download ActivePython or customize Python with the packages you require and get automatic updates.

Download
ActivePython
INSTALL>
pypm install baked

How to install baked

  1. Download and install ActivePython
  2. Open Command Prompt
  3. Type pypm install baked
 Python 2.7Python 3.2Python 3.3
Windows (32-bit)
Windows (64-bit)
Mac OS X (10.5+)
Linux (32-bit)
Linux (64-bit)
0.1.3.3 Available View build log
 
Author
License
BSD
Imports
Lastest release
version 0.1.3.3 on May 26th, 2013

A script to detect that the import order matches Mozilla WebDev Python guidelines. Usage:

baked.py [filename] [filename..]

Filename can be a glob. Or multiple filenames. For example:

baked.py apps/*.py mkt/*.py

Baked will also accept files being piped to it, for example:

git diff-index HEAD^ --name-only | baked

Baked loads a confg file as JSON. It will look in the following places for the file:

  • the current directory for .baked
  • the users profile directory for .baked

For an example see:

https://gist.github.com/andymckay/5507339

The config file contains:

  • order: the list of orders of import blocks. This allows you to group your imports into categories.
  • fallback: if a category is not found for lib, what should it fall back to, for most this will be local.
  • 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.
  • modules: a dictionary of categories and a list of modules. This allows baked to put each module in the category.

If you'd like to exclude an import from baked add the comment #NOQA.

Guidelines:

http://mozweb.readthedocs.org/en/latest/coding.html#import-statements

With one exception, we ignore that imports should be ordered CONSTANT, Class, var. Just sort by alpha, case insensitive. That's easier for everyone to parse.

Subscribe to package updates

Last updated May 26th, 2013

Download Stats

Last month:1

What does the lock icon mean?

Builds marked with a lock icon are only available via PyPM to users with a current ActivePython Business Edition subscription.

Need custom builds or support?

ActivePython Enterprise Edition guarantees priority access to technical support, indemnification, expert consulting and quality-assured language builds.

Plan on re-distributing ActivePython?

Get re-distribution rights and eliminate legal risks with ActivePython OEM Edition.