Open kasium opened 3 years ago
I'm also experiencing this with # isort: list
. It'd be great to have this so we can sort __all__
.
The same for # isort: unique-tuple
, # isort: unique-list
, #isort: set
and # isort: dict
. I would like to use # isort: unique-tuple
for __all__
that contains many members.
Actually, the tuple sorting should follow the multi_line_output
option (or possibly a similar new option for the tuple sorting) rather than the profile.
As a first step, it would be OK if the output is compatible with black (as described in #1358), but in general literal.assignment
needs to implement calling a variant of wrap.import_statement
. (Maybe the author is aware of it, but he is too busy to implement it...)
This is true for all literal / type sorts, and is why they aren't documented / advertised features, even though If they were in a good spot I would do so because I think they are useful!
As a first step, it would be OK if the output is compatible with black (as described in #1358), but in general literal.assignment needs to implement calling a variant of wrap.import_statement. (Maybe the author is aware of it, but he is too busy to implement it...)
That's exactly right, I've just been busy, will accept PRs for this or will get to it at some point
The tuple, list, etc sorting options don't consider the profile option.
Code:
isort dummy.py --profile black
black dummy.py
I would expect that these sorting options consider the profile as normal. Also, the sorting options are not documented but noted here #1358