Files
openide/python/testData/optimizeImports/sortImportsByNameFirstWithinGroup.after.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

12 lines
194 B
Python

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