-
Notifications
You must be signed in to change notification settings - Fork 6.9k
Closed
Description
Summary
Update format.sh so that developers can format code in the Black code style, but continue to use YAPF by default.
Motivation
The pull request to Blacken the code will modify over 1,500 files. To ensure that the changes to format.sh are easily reviewable, we'll make the changes in a separate PR.
Changes
Here are all of the specific changes we'll need to make to implement this functionality:
- Add
black==21.12b0topython/requirements_linters.txt - Add
black==21.12b0topython/ray/tune/requirements-dev.txt - Add
black==21.12b0to.gitpod/Dockerfile - Add the ability to format code with Black using
format.sh, but guard the changes behind a flagBLACK_FORMATTER_ENABLED. When we format the code with Black, we'll set the flag totrueand make Black the default formatter. - Update
.flake8to make flake8 compatible with Black. To learn more about the changes we'll need to make, see the relevant section of the Black documentation. Note that none of these changes will cause issues with our current setup.
Metadata
Metadata
Assignees
Labels
No labels