Thursday, March 3, 2016

Python - isort, useful tool for sorting python imports

http://timothycrosley.github.io/isort/

I saw it in the django coding style documentation: https://docs.djangoproject.com/en/1.9/internals/contributing/writing-code/coding-style/

To make an entire project's imports easier to read, all you need to do is:

  • pip install isort
  • isort -rc .

There's also a sublime plugin for it here: https://github.com/thijsdezoete/sublime-text-isort-plugin#install

No comments:

Post a Comment