-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add import sorting to format.sh (#25678)
It will be easier to develop if we could use a tool to organize / sort imports and not have to move them around by hand. This PR shows how we could do this with isort (black doesn't quite do this per psf/black#333) After this PR lands everyone will need to update their formatter to include isort if they don't have it already, i.e. pip install -r ./python/requirements_linters.txt All future file changes will go through isort and may introduce a slightly larger PR the first time as it will clean up the imports. The plan is to land this PR and also clean up the rest of the code in parallel by using this PR to format the codebase (so people won't get surprised by the formatter if the file hasn't been touched yet) Co-authored-by: Clarence Ng <[email protected]>
- Loading branch information
1 parent
5e9a8eb
commit 73e1131
Showing
46 changed files
with
379 additions
and
357 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
[settings] | ||
# This is to make isort compatible with Black. See | ||
# https://black.readthedocs.io/en/stable/the_black_code_style.html#how-black-wraps-lines. | ||
line_length=88 | ||
multi_line_output=3 | ||
include_trailing_comma=True | ||
use_parentheses=True | ||
float_to_top=True | ||
|
||
|
||
known_first_party=ray |
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 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 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.