Skip to content
This repository was archived by the owner on Jan 12, 2026. It is now read-only.

Commit b45c5d9

Browse files
authored
Reformat using black (#281)
The Ray main repo is using black, so we may want to do the same.
1 parent 02a1cb3 commit b45c5d9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

74 files changed

+3178
-2298
lines changed

.flake8

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
[flake8]
2+
max-line-length = 88
3+
inline-quotes = "
4+
ignore =
5+
C408
6+
C417
7+
E121
8+
E123
9+
E126
10+
E203
11+
E226
12+
E24
13+
E704
14+
W503
15+
W504
16+
W605
17+
I
18+
N
19+
B001
20+
B002
21+
B003
22+
B004
23+
B005
24+
B007
25+
B008
26+
B009
27+
B010
28+
B011
29+
B012
30+
B013
31+
B014
32+
B015
33+
B016
34+
B017
35+
avoid-escape = no
36+
# Error E731 is ignored because of the migration from YAPF to Black.
37+
# See https://github.com/ray-project/ray/issues/21315 for more information.
38+
per-file-ignores =
39+
rllib/evaluation/worker_set.py:E731
40+
rllib/evaluation/sampler.py:E731

.github/workflows/test.yaml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,13 @@ jobs:
2020
run: |
2121
python -m pip install --upgrade pip
2222
python -m pip install codecov
23-
python -m pip install -U yapf==0.23.0 flake8==3.7.7 flake8-comprehensions flake8-quotes==2.0.0
23+
if [ -f requirements/lint-requirements.txt ]; then python -m pip install -r requirements/lint-requirements.txt; fi
2424
- name: Print environment info
2525
run: |
2626
./xgboost_ray/tests/env_info.sh
2727
- name: Run format script
2828
run: |
29+
ls -alp
2930
./format.sh --all
3031
3132
test_linux_ray_master:
@@ -52,7 +53,7 @@ jobs:
5253
python -m pip install --upgrade pip
5354
python -m pip install codecov
5455
python -m pip install -U ${{ matrix.ray-wheel }}
55-
if [ -f requirements-test.txt ]; then python -m pip install -r requirements-test.txt; fi
56+
if [ -f requirements/test-requirements.txt ]; then python -m pip install -r requirements/test-requirements.txt; fi
5657
- name: Install package
5758
run: |
5859
python -m pip install -e .
@@ -89,7 +90,7 @@ jobs:
8990
python -m pip install --upgrade pip
9091
python -m pip install codecov
9192
python -m pip install -U ray
92-
if [ -f requirements-test.txt ]; then python -m pip install -r requirements-test.txt; fi
93+
if [ -f requirements/test-requirements.txt ]; then python -m pip install -r requirements/test-requirements.txt; fi
9394
- name: Install package
9495
run: |
9596
python -m pip install -e .
@@ -128,7 +129,7 @@ jobs:
128129
python -m pip install --upgrade pip
129130
python -m pip install codecov
130131
python -m pip install -U ray
131-
if [ -f requirements-test.txt ]; then python -m pip install -r requirements-test.txt; fi
132+
if [ -f requirements/test-requirements.txt ]; then python -m pip install -r requirements/test-requirements.txt; fi
132133
- name: Uninstall unavailable dependencies
133134
# Disables modin and Ray Tune (via tabulate)
134135
run: |
@@ -179,7 +180,7 @@ jobs:
179180
python -m pip install --upgrade pip
180181
python -m pip install codecov
181182
python -m pip install -U ${{ matrix.ray-wheel }}
182-
if [ -f requirements-test.txt ]; then python -m pip install -r requirements-test.txt; fi
183+
if [ -f requirements/test-requirements.txt ]; then python -m pip install -r requirements/test-requirements.txt; fi
183184
- name: Install Ubuntu system dependencies
184185
run: |
185186
sudo apt-get install -y --no-install-recommends ninja-build
@@ -234,7 +235,7 @@ jobs:
234235
python -m pip install --upgrade pip
235236
python -m pip install codecov
236237
python -m pip install -U ray
237-
if [ -f requirements-test.txt ]; then python -m pip install -r requirements-test.txt; fi
238+
if [ -f requirements/test-requirements.txt ]; then python -m pip install -r requirements/test-requirements.txt; fi
238239
- name: Install package
239240
run: |
240241
python -m pip install -e .

.style.yapf

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)