Skip to content

Commit

Permalink
Unbreak code style checks on Travis CI
Browse files Browse the repository at this point in the history
  • Loading branch information
xolox committed Aug 10, 2016
1 parent 4698611 commit 6fd40e5
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 6 deletions.
6 changes: 2 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Makefile for executor.
#
# Author: Peter Odding <peter@peterodding.com>
# Last Change: July 9, 2016
# Last Change: August 10, 2016
# URL: https://github.com/xolox/python-executor

WORKON_HOME ?= $(HOME)/.virtualenvs
Expand Down Expand Up @@ -41,9 +41,7 @@ reset:
$(MAKE) install

check: install
@echo "Updating flake8 .." >&2
@pip-accel install --upgrade --quiet --requirement=requirements-checks.txt
@flake8
@scripts/check-code-style.sh

test: install
@pip-accel install --quiet coverage pytest pytest-cov
Expand Down
4 changes: 2 additions & 2 deletions executor/ssh/server.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Programmer friendly subprocess wrapper.
#
# Author: Peter Odding <peter@peterodding.com>
# Last Change: May 29, 2016
# Last Change: August 10, 2016
# URL: https://executor.readthedocs.org

"""
Expand Down Expand Up @@ -202,7 +202,7 @@ def sshd_path(self):
@property
def client_options(self):
"""
OpenSSH client options required to connect with the server.
Options for the OpenSSH client, required to connect with the server.
This is a dictionary of keyword arguments for :class:`.RemoteCommand`
to make it connect with the OpenSSH server (assuming the remote command
Expand Down
16 changes: 16 additions & 0 deletions scripts/check-code-style.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#!/bin/bash -e

# I value automated code style checks that break my Travis CI builds but I also
# value compatibility with Python 2.6, however recently it seems that flake8
# has dropped Python 2.6 compatibility [1]. That's only fair, but now I need to
# work around it, hence this trivial script :-).
#
# [1] https://travis-ci.org/xolox/python-executor/jobs/151190070

if python -c 'import sys; sys.exit(0 if sys.version_info[:2] >= (2, 7) else 1)'; then
echo "Updating installation of flake8 .." >&2
pip-accel install --upgrade --quiet --requirement=requirements-checks.txt
flake8
else
echo "Skipping code style checks on Python 2.6 .." >&2
fi

0 comments on commit 6fd40e5

Please sign in to comment.