-
Notifications
You must be signed in to change notification settings - Fork 6.9k
Closed
Description
Overview
The Ray Team has decided to format the Ray Python code with Black. This means that going forward, changes to Python code must adhere to the Black code style.
We'll be updating ./scripts/format.sh, so if you're a contributor, your workflow shouldn't change.
Motivation
We're switching to Black because:
- Code formatted with Black is more readable than code formatted with YAPF.
- Black is faster than YAPF.
- Black is the most popular Python formatting tool.
For more information about the motivation behind this change, read the full proposal.
Implementation Plan
We're planning on rolling out the changes in three phases.
Phase One:
- [CI] Update
format.shto support the Black code style #21312 - [CI] [RLlib] flake8 raises E731 after code is formatted with Black #21315
- [CI] [RLlib] Prevent Black from erroring while formatting
multi_agent_env.py#21314 - [CI] [Core] Prevent Black from erroring while formatting
test_resource_demand_scheduler.py#21313
Phase Two:
- [CI] Format Python code with Black #21316
- Comment on open pull requests and tell contributors how to update their code.
Phase Three:
- [Documentation] Change code style from Google to Black #21317
- [CI] Remove or replace YAPF disables #21318
- [CI] Remove YAPF from
format.sh#21319
Timeline
| Phase | Due Date | Status |
|---|---|---|
| I | 1/1 | ✅ Done |
| II | ✅ Done | |
| III | 1/31 | ✅ Done |
matthewdeng, jovany-wang, pcmoritz, scv119, sumanthratna and 4 moreFisher-Wang
Metadata
Metadata
Assignees
Labels
No labels