Skip to content

Commit 66188cb

Browse files
committed
Switch from YAPF to Black
1 parent f338c59 commit 66188cb

17 files changed

+110
-325
lines changed

.style.yapf

-180
This file was deleted.

CHEATSHEET.rst

+1-9
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,7 @@ To run tests
99

1010
* Actually run the tests: ``pytest pytest_trio``
1111

12-
13-
To run yapf
14-
-----------
15-
16-
* Show what changes yapf wants to make: ``yapf -rpd setup.py
17-
pytest_trio``
18-
19-
* Apply all changes directly to the source tree: ``yapf -rpi setup.py
20-
pytest_trio``
12+
* Format the code with ``black .``
2113

2214

2315
To make a release

MANIFEST.in

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
include README.rst CHEATSHEET.rst LICENSE* CODE_OF_CONDUCT* CONTRIBUTING*
2-
include .coveragerc .style.yapf
2+
include .coveragerc
33
include test-requirements.txt
44
recursive-include docs *
55
prune docs/build

ci.sh

+4-7
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@ set -ex -o pipefail
66
uname -a
77
env | sort
88

9-
# See https://github.com/python-trio/trio/issues/334
10-
YAPF_VERSION=0.22.0
11-
129
# Curl's built-in retry system is not very robust; it gives up on lots of
1310
# network errors that we want to retry on. Wget might work better, but it's
1411
# not installed on azure pipelines's windows boxes. So... let's try some good
@@ -33,16 +30,16 @@ python setup.py sdist --formats=zip
3330
python -m pip install dist/*.zip
3431

3532
if [ "$CHECK_FORMATTING" = "1" ]; then
36-
pip install yapf==${YAPF_VERSION}
37-
if ! yapf -rpd setup.py pytest_trio; then
33+
pip install black
34+
if ! black --check . ; then
3835
cat <<EOF
3936
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
4037
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
4138
4239
Formatting problems were found (listed above). To fix them, run
4340
44-
pip install yapf==${YAPF_VERSION}
45-
yapf -rpi setup.py pytest_trio
41+
pip install black
42+
black .
4643
4744
in your local checkout.
4845

0 commit comments

Comments
 (0)