I like to have compatibility packages like six right below the __future__ imports; therefore I tried --future six to isort the following little example:
from __future__ import print_function
import six
from AccessControl import Unauthorized
from six.moves.urllib.parse import urlsplit, urlunsplit
print('done!')
However, because of the --future option, the six imports are put above the __future__ imports, like so:
import six
from six.moves.urllib.parse import urlsplit, urlunsplit
from __future__ import print_function
from AccessControl import Unauthorized
print('done!')
This won't compile, of course.
Nothing is allowed above __future__ imports but comments and the module docstring (and empty lines, and other __future__ imports).
I like to have compatibility packages like
sixright below the__future__imports; therefore I tried--future sixto isort the following little example:However, because of the
--futureoption, thesiximports are put above the__future__imports, like so:This won't compile, of course.
Nothing is allowed above
__future__imports but comments and the module docstring (and empty lines, and other__future__imports).