I found isort has already pylama plugin. It's implemented in isort repository and mentioned in pylama help output:
pylama -h
...
--linters LINTERS, -l LINTERS
Select linters. (comma-separated). Choices are mccabe,
pep257,pydocstyle,pep8,pycodestyle,pyflakes,isort.
It's not enabled by default so you need to configure pylama explicitly
pylama --linters isort file_to_test
or in pylama.ini
configuration file
[pylama]
linters = isort
(Default linters are pycodestyle, pyflakes, mccabe).
In contrast to check -c
it doesn't provide information which lines are incorrectly imported. If something is wrong it always shows same error message:
file_to_test.py:0: [I] Incorrectly sorted imports. [isort]