Skip to content

Commit

Permalink
[ci] Adapt to yapf 0.17, and some misc cosmetic improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
njsmith committed Aug 21, 2017
1 parent 6dea214 commit 9e97900
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 15 deletions.
16 changes: 8 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,6 @@ dist: trusty

matrix:
include:
- os: linux
language: python
python: 3.6
env: DOC_BUILD=1
- os: linux
language: python
python: 3.6
env: FORMATTING=1
- os: linux
language: generic
env: USE_PYPY_NIGHTLY=1
Expand All @@ -31,6 +23,14 @@ matrix:
- os: osx
language: generic
env: MACPYTHON=3.6.0
- os: linux
language: python
python: 3.6
env: CHECK_DOCS=1
- os: linux
language: python
python: 3.6
env: CHECK_FORMATTING=1

script:
- ci/travis.sh
13 changes: 6 additions & 7 deletions ci/travis.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,24 +59,23 @@ pip install -U pip setuptools wheel
python setup.py sdist --formats=zip
pip install dist/*.zip

if [ "$DOC_BUILD" = "1" ]; then
if [ "$CHECK_DOCS" = "1" ]; then
pip install -Ur ci/rtd-requirements.txt
cd docs
# -n (nit-picky): warn on missing references
# -W: turn warnings into errors
sphinx-build -nW -b html source build
elif [ "$FORMATTING" = "1" ]; then
elif [ "$CHECK_FORMATTING" = "1" ]; then
pip install -U yapf
yapf -rdp setup.py trio > formatting-fixes.patch
if [ -s formatting-fixes.patch ]; then
if ! yapf -rpd setup.py trio; then
cat <<EOF
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
The following formatting problems were found. To fix them, run
Formatting problems were found (listed above). To fix them, run
pip install yapf
yapf -rip setup.py trio
pip install -U yapf
yapf -rpi setup.py trio
in your local checkout.
Expand Down

0 comments on commit 9e97900

Please sign in to comment.