isort

We’re using isort to sort the Python import statements.

Config

Please have a look at the isort config for all configured options.

Hint

To see all available configuration options, have a look at the isort documentation.

Makefile

To use the config in your project, use the following Makefile targets:

LINTER_CONFIGS = https://git.confirm.ch/confirm/development-guidelines/raw/master/configs

isort:
    curl -sSfLo .isort.cfg $(LINTER_CONFIGS)/isort.cfg
    isort $(SOURCE_DIR)

test-isort:
    curl -sSfLo .isort.cfg $(LINTER_CONFIGS)/isort.cfg
    isort -c --diff $(SOURCE_DIR)