Isort is disregarding the multiply line import
Found in version 5.12.0 of isort from solving https://github.com/Zac-HD/shed/pull/94
Multiline import will automatically be put in one line.
Here is an example:
from os import (
waitpid,
waitstatus_to_exitcode,
walk,
write,
writev,
)
print(
waitpid,
waitstatus_to_exitcode,
walk,
write,
write,
)
Becomes
from os import waitpid, waitstatus_to_exitcode, walk, write, writev
print(
waitpid,
waitstatus_to_exitcode,
walk,
write,
write,
)
CC @Zac-HD
This is starting to give me some pain. I am happy to look into a possible solution and attempt a PR.
More specifically, the problem is that isort doesn't respect the "magic trailing comma" which Black uses, even when using profile=black.
~~It doesn't do that even when given --split-on-trailing-comma option. Looks like a regression of the feature introduced in #1876?~~
Edit: the --split-on-trailing-comma option works fine, my bad. Looks like this option is not enabled by default with --profile=black. IMO it should, since this is black's current behavior.