New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
force_single_line
for the black
profile
#1791
Comments
I use black profile so that I get maximum interoperability with black's formatter, not so much to adhere to its code style philosophy (and arguably, usage of parenthesis and magic trailing comma handling in multiline from imports is more in line with Black's philosophy anyway; see also #1683). I feel this is something that is best left to the user, same as other settings like |
I hate to dash your dreams so quickly, but this won't happen at the isort level. The good news is you can always configure it yourself or even very easily create your own public shared profile that you can proliferate through out your own projects. Now to the reasons why:
As long as Black does this: list = ["a", "b", "c"]
really_long_list = [
"a",
"b",
"c"...
] isort should do this:
In my mind, repeating the import package over and over needlessly, is unreadable and messy.
is just soooo much easier to digest and cleaner then:
And this is an extremely common case! So while I'm sorry isort can't make this change, I hope you can understand the reasons why, even if they are different from your own preferences, which isort will continue to support via configuration. |
I'd like to bring up for discussion the idea of changing the
black
profile to useforce_single_line=true
, which reduces merge conflicts by a lot.This aligns well with black's goal to reduce merge conflicts.
I've mentioned it on the black side, but was told that it's best to open a discussion here.
Is this change something that can happen?
cc: @ichard26
The text was updated successfully, but these errors were encountered: