Isort Import Formatting

Context and problem statement

Import ordering in Archivematica related projects is inconsistant and can be a distraction from actual content.

The import style described by PEP 8 is good, but not specific enough.

As with code formatting tools, automating import ordering simplifies developer decisions and code review.

Considered options


isort, because it’s well established. If black does add support, it may make sense to move to it.

For example:

from __future__ import unicode_literals

import os

from lxml import etree
from django import forms
from django.conf import settings

from countryCodes import getCodeForCountry

from main.models import Derivation, File, FPCommandOutput, RightsStatement