Files
openide/python/testData/optimizeImports/sortImportsByNameFirstWithinGroup.py
Mikhail Golubev e5c79dde87 PY-18792 Allow to order imports within the same group first by name, then by type
This way several imports for the same module or package are placed
together regardless of their type. For instance, "import pkg1",
"import pkg2", "from pkg1 import a" are ordered as "import pkg1",
"from pkg1 import a", "import pkg2", i.e. imports of the same kind are
not necessarily put together since names of qualifier and imported
symbols have greater priority.

This is similar to the style "google" of flake8-import-order package and
flag "--force-sort-within-sections" of isort.
2016-06-15 19:34:14 +03:00

14 lines
197 B
Python

import pkg1
from pkg1 import
from pkg1 import a1
import pkg3
from pkg1 import b1
from pkg2 import a2, b2
from pkg2 import *
import pkg2
from pkg2 import
print(pkg1, pkg2, pkg3, a1, a2, b1, b2)