This import order is a little goofy. As far as I can see, PEP 8 says to sort imports alphabetically (within each group) by module name, not to put the "from" imports after the non-from ones.