Skip to content

Commit

Permalink
Reformat using black (#281)
Browse files Browse the repository at this point in the history
The Ray main repo is using black, so we may want to do the same.
  • Loading branch information
krfricke authored Apr 25, 2023
1 parent 02a1cb3 commit b45c5d9
Show file tree
Hide file tree
Showing 74 changed files with 3,178 additions and 2,298 deletions.
40 changes: 40 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
[flake8]
max-line-length = 88
inline-quotes = "
ignore =
C408
C417
E121
E123
E126
E203
E226
E24
E704
W503
W504
W605
I
N
B001
B002
B003
B004
B005
B007
B008
B009
B010
B011
B012
B013
B014
B015
B016
B017
avoid-escape = no
# Error E731 is ignored because of the migration from YAPF to Black.
# See https://github.com/ray-project/ray/issues/21315 for more information.
per-file-ignores =
rllib/evaluation/worker_set.py:E731
rllib/evaluation/sampler.py:E731
13 changes: 7 additions & 6 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,13 @@ jobs:
run: |
python -m pip install --upgrade pip
python -m pip install codecov
python -m pip install -U yapf==0.23.0 flake8==3.7.7 flake8-comprehensions flake8-quotes==2.0.0
if [ -f requirements/lint-requirements.txt ]; then python -m pip install -r requirements/lint-requirements.txt; fi
- name: Print environment info
run: |
./xgboost_ray/tests/env_info.sh
- name: Run format script
run: |
ls -alp
./format.sh --all
test_linux_ray_master:
Expand All @@ -52,7 +53,7 @@ jobs:
python -m pip install --upgrade pip
python -m pip install codecov
python -m pip install -U ${{ matrix.ray-wheel }}
if [ -f requirements-test.txt ]; then python -m pip install -r requirements-test.txt; fi
if [ -f requirements/test-requirements.txt ]; then python -m pip install -r requirements/test-requirements.txt; fi
- name: Install package
run: |
python -m pip install -e .
Expand Down Expand Up @@ -89,7 +90,7 @@ jobs:
python -m pip install --upgrade pip
python -m pip install codecov
python -m pip install -U ray
if [ -f requirements-test.txt ]; then python -m pip install -r requirements-test.txt; fi
if [ -f requirements/test-requirements.txt ]; then python -m pip install -r requirements/test-requirements.txt; fi
- name: Install package
run: |
python -m pip install -e .
Expand Down Expand Up @@ -128,7 +129,7 @@ jobs:
python -m pip install --upgrade pip
python -m pip install codecov
python -m pip install -U ray
if [ -f requirements-test.txt ]; then python -m pip install -r requirements-test.txt; fi
if [ -f requirements/test-requirements.txt ]; then python -m pip install -r requirements/test-requirements.txt; fi
- name: Uninstall unavailable dependencies
# Disables modin and Ray Tune (via tabulate)
run: |
Expand Down Expand Up @@ -179,7 +180,7 @@ jobs:
python -m pip install --upgrade pip
python -m pip install codecov
python -m pip install -U ${{ matrix.ray-wheel }}
if [ -f requirements-test.txt ]; then python -m pip install -r requirements-test.txt; fi
if [ -f requirements/test-requirements.txt ]; then python -m pip install -r requirements/test-requirements.txt; fi
- name: Install Ubuntu system dependencies
run: |
sudo apt-get install -y --no-install-recommends ninja-build
Expand Down Expand Up @@ -234,7 +235,7 @@ jobs:
python -m pip install --upgrade pip
python -m pip install codecov
python -m pip install -U ray
if [ -f requirements-test.txt ]; then python -m pip install -r requirements-test.txt; fi
if [ -f requirements/test-requirements.txt ]; then python -m pip install -r requirements/test-requirements.txt; fi
- name: Install package
run: |
python -m pip install -e .
Expand Down
6 changes: 0 additions & 6 deletions .style.yapf

This file was deleted.

Loading

0 comments on commit b45c5d9

Please sign in to comment.