Skip to content

Commit

Permalink
[SPARK-23174][DOC][PYTHON] python code style checker update fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
ashashwat committed Jan 30, 2018
1 parent 5056877 commit 78cb070
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions dev/lint-python
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ python -B -m compileall -q -l $PATHS_TO_CHECK > "$PYCODESTYLE_REPORT_PATH"
compile_status="${PIPESTATUS[0]}"

# Get pycodestyle at runtime so that we don't rely on it being installed on the build server.
#+ See: https://github.com/apache/spark/pull/1744#issuecomment-50982162
# Updated to latest official version for pep8. pep8 is formally renamed to pycodestyle.
# See: https://github.com/apache/spark/pull/1744#issuecomment-50982162
# Updated to the latest official version of pep8. pep8 is formally renamed to pycodestyle.
PYCODESTYLE_VERSION="2.3.1"
PYCODESTYLE_SCRIPT_PATH="$SPARK_ROOT_DIR/dev/pycodestyle-$PYCODESTYLE_VERSION.py"
PYCODESTYLE_SCRIPT_REMOTE_PATH="https://raw.githubusercontent.com/PyCQA/pycodestyle/$PYCODESTYLE_VERSION/pycodestyle.py"
Expand All @@ -60,9 +60,9 @@ export "PYLINT_HOME=$PYTHONPATH"
export "PATH=$PYTHONPATH:$PATH"

# There is no need to write this output to a file
#+ first, but we do so so that the check status can
#+ be output before the report, like with the
#+ scalastyle and RAT checks.
# first, but we do so so that the check status can
# be output before the report, like with the
# scalastyle and RAT checks.
python "$PYCODESTYLE_SCRIPT_PATH" --config=dev/tox.ini $PATHS_TO_CHECK >> "$PYCODESTYLE_REPORT_PATH"
pycodestyle_status="${PIPESTATUS[0]}"

Expand All @@ -73,7 +73,7 @@ else
fi

if [ "$lint_status" -ne 0 ]; then
echo "PYCODESTYLE checks failed."
echo "pycodestyle checks failed."
cat "$PYCODESTYLE_REPORT_PATH"
rm "$PYCODESTYLE_REPORT_PATH"
exit "$lint_status"
Expand Down

0 comments on commit 78cb070

Please sign in to comment.