forked from pantsbuild/pants
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use Black internally for auto-formatting (pantsbuild#9157)
The Pants committers recently decided to use Black for automated formatting of the project. While we do not agree with all of its choices—particularly 4 space indentation—we decided the tool brings more benefits than harm. ### Manually fixing multiline strings in this PR Black does not attempt to handle multiline strings because it could not safely do this without changing the AST. (Fortunately, docformatter fixes the majority of instances.) We must manually fix all bad usages of triple quoted strings. To do this, we first ran [this script](https://gist.github.com/Eric-Arellano/4680bd4a6facaa52373d42ca0213220e) to find all instances of multiline strings. Then, we tracked this in https://docs.google.com/spreadsheets/d/1cL5hmWjHfoCdbdThgOxAmCBDJhp5NelmUkYgidXIwGw/edit#gid=0 and manually checked each of the 720 files. 329/720 files needed fixes. ### How to resolve merge conflicts 1. `git pull origin master` (do not rebase) 2. For any merge conflict: 1. **Unconditionally accept your original version**. Do not try to manually fix merge conflicts. 2. `./pants fmt2 path/to/merge_conflict.py`. 3. Open the file and search for `"""`. Ensure that all multiline strings are properly formatted.
- Loading branch information
1 parent
d690ab2
commit 29cf9fc
Showing
1,325 changed files
with
162,149 additions
and
147,550 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.