-
-
Notifications
You must be signed in to change notification settings - Fork 646
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
Modify isort config to prepare for black formatting #8332
Modify isort config to prepare for black formatting #8332
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding John/Benjy to give their go-ahead on Black, since I didn't see their responses to the thread you started.
.isort.cfg
Outdated
@@ -3,6 +3,10 @@ | |||
|
|||
[settings] | |||
line_length=100 | |||
multi_line_outddput=3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't look like a valid setting?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct, and that's why all these files are formatted wrong! https://github.com/psf/black#how-black-wraps-lines
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm happy enough to have black and thus happy for the prep work. Stu's eye caught a bug that would have led to thrash so that needs to be fixed up.
.isort.cfg
Outdated
@@ -3,6 +3,10 @@ | |||
|
|||
[settings] | |||
line_length=100 | |||
multi_line_outddput=3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct, and that's why all these files are formatted wrong! https://github.com/psf/black#how-black-wraps-lines
6af958f
to
34efe0a
Compare
Note: this is one of the prerequisites for #8334 |
Problem
Currently, the formatting situation in the python code is quite painful as it involves manual formatting of code.
I would like to replace our current workflow with one involving Black in a subsequent PR (see motivations for the choice over there).
Black is opinionated about code layout, so with our current settings, Black and isort would be having minor opinion differences.
Solution
Modify the isort configuration to bend to Black's taste.
Result
Once we run Black on the codebase with a minimal configuration, isort will be happy with the results.