isort dont respect pylint ungrouped-imports checks
Hi, isort sort all import by alphabet but pylint want to group import from same module, example: isort variant:
import functools
import os
from copy import deepcopy
from functools import reduce, wraps
from itertools import repeat
pylint variant
import os
from copy import deepcopy
import functools
from functools import reduce, wraps
from itertools import repeat
As you can see import from functools in pylint variat are grouped.
By default isort moves import xxx lines to the top of the sections, before from xxx import yyy lines. This can be changed by adding force_sort_within_sections=True to .isort.cfg.
However, when I enabled it, I notice another problem - isort starts moving # pylist disable=xxx comments to the top of the sections instead of leaving them where they are, even when none of the imports were actually reordered:
import os
# pylint: disable=app-dependency
import sys
# pylint: enable=app-dependency
becomes
# pylint: disable=app-dependency
import os
import sys
# pylint: enable=app-dependency
If I remove the force_sort_within_sections=True option, the result is correct:
import os
# pylint: disable=app-dependency
import sys
# pylint: enable=app-dependency
This is fixed in the latest version of isort. Thanks for reporting!