From 968d9e7e08d730863427cfc48c49ebee82724919 Mon Sep 17 00:00:00 2001 From: hyukjinkwon Date: Wed, 31 May 2017 19:38:58 +0900 Subject: [PATCH] Ignore pep8 on work directory --- dev/lint-python | 4 ++-- dev/tox.ini | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/dev/lint-python b/dev/lint-python index c6f3fbfab84ed..07e2606d45143 100755 --- a/dev/lint-python +++ b/dev/lint-python @@ -20,7 +20,7 @@ SCRIPT_DIR="$( cd "$( dirname "$0" )" && pwd )" SPARK_ROOT_DIR="$(dirname "$SCRIPT_DIR")" # Exclude auto-geneated configuration file. -PATHS_TO_CHECK="$( cd "$SPARK_ROOT_DIR" && find . -name "*.py" -not -path "*python/docs/conf.py" )" +PATHS_TO_CHECK="$( cd "$SPARK_ROOT_DIR" && find . -name "*.py" )" PEP8_REPORT_PATH="$SPARK_ROOT_DIR/dev/pep8-report.txt" PYLINT_REPORT_PATH="$SPARK_ROOT_DIR/dev/pylint-report.txt" PYLINT_INSTALL_INFO="$SPARK_ROOT_DIR/dev/pylint-info.txt" @@ -64,7 +64,7 @@ export "PATH=$PYTHONPATH:$PATH" #+ first, but we do so so that the check status can #+ be output before the report, like with the #+ scalastyle and RAT checks. -python "$PEP8_SCRIPT_PATH" --ignore=E402,E731,E241,W503,E226 --config=dev/tox.ini $PATHS_TO_CHECK >> "$PEP8_REPORT_PATH" +python "$PEP8_SCRIPT_PATH" --config=dev/tox.ini $PATHS_TO_CHECK >> "$PEP8_REPORT_PATH" pep8_status="${PIPESTATUS[0]}" if [ "$compile_status" -eq 0 -a "$pep8_status" -eq 0 ]; then diff --git a/dev/tox.ini b/dev/tox.ini index 76e3f42cde62d..eeeb637460cfb 100644 --- a/dev/tox.ini +++ b/dev/tox.ini @@ -14,5 +14,6 @@ # limitations under the License. [pep8] +ignore=E402,E731,E241,W503,E226 max-line-length=100 -exclude=cloudpickle.py,heapq3.py,shared.py +exclude=cloudpickle.py,heapq3.py,shared.py,python/docs/conf.py,work/*/*.py