Skip to content

Commit 11ad2c1

Browse files
committed
updated for review comments
1 parent ee14cf7 commit 11ad2c1

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

dev/lint-python

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,14 @@ SCRIPT_DIR="$( cd "$( dirname "$0" )" && pwd )"
2121
SPARK_ROOT_DIR="$(dirname "$SCRIPT_DIR")"
2222
# Exclude auto-generated configuration file.
2323
PATHS_TO_CHECK="$( cd "$SPARK_ROOT_DIR" && find . -name "*.py" )"
24-
DOC_PATHS_TO_CHECK="$( cd "$SPARK_ROOT_DIR" && find . -name "*.py" | grep -vF 'functions.py')"
24+
DOC_PATHS_TO_CHECK="$( cd "$SPARK_ROOT_DIR" && find . -name "*.py" | grep -vF 'functions.py' )"
2525
PYCODESTYLE_REPORT_PATH="$SPARK_ROOT_DIR/dev/pycodestyle-report.txt"
2626
PYDOCSTYLE_REPORT_PATH="$SPARK_ROOT_DIR/dev/pydocstyle-report.txt"
2727
PYLINT_REPORT_PATH="$SPARK_ROOT_DIR/dev/pylint-report.txt"
2828
PYLINT_INSTALL_INFO="$SPARK_ROOT_DIR/dev/pylint-info.txt"
2929
PYDOCSTYLEBUILD="pydocstyle"
30-
PYDOCSTYLEVERSION=$(python -c 'import pkg_resources; print pkg_resources.get_distribution("pydocstyle").version')
30+
EXPECTED_PYDOCSTYLEVERSION="2.1.1"
31+
PYDOCSTYLEVERSION=$(python -c 'import pkg_resources; print(pkg_resources.get_distribution("pydocstyle").version)' 2> /dev/null)
3132
SPHINXBUILD=${SPHINXBUILD:=sphinx-build}
3233

3334
SPHINX_REPORT_PATH="$SPARK_ROOT_DIR/dev/sphinx-report.txt"
@@ -89,7 +90,7 @@ fi
8990

9091
# Check python document style, skip check if pydocstyle is not installed.
9192
if hash "$PYDOCSTYLEBUILD" 2> /dev/null; then
92-
if [ $PYDOCSTYLEVERSION == "2.1.1" ]; then
93+
if [ "$PYDOCSTYLEVERSION">="$EXPECTED_PYDOCSTYLEVERSION" ]; then
9394
pydocstyle --config=dev/tox.ini $DOC_PATHS_TO_CHECK >> "$PYDOCSTYLE_REPORT_PATH"
9495
pydocstyle_status="${PIPESTATUS[0]}"
9596

@@ -109,7 +110,7 @@ if hash "$PYDOCSTYLEBUILD" 2> /dev/null; then
109110
rm "$PYDOCSTYLE_REPORT_PATH"
110111
fi
111112
else
112-
echo "The pydocstyle version needs to be latest 2.1.1"
113+
echo "The pydocstyle version needs to be latest 2.1.1.Skipping pydoc checks for now"
113114
fi
114115
else
115116
echo >&2 "The pydocstyle command was not found. Skipping pydoc checks for now"

dev/tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ ignore=E402,E731,E241,W503,E226,E722,E741,E305
1818
max-line-length=100
1919
exclude=cloudpickle.py,heapq3.py,shared.py,python/docs/conf.py,work/*/*.py,python/.eggs/*
2020
[pydocstyle]
21-
ignore=D100,D101,D102,D103,D104,D105,D106,D107,D200,D201,D202,D203,D204,D205,D206,D207,D208,D209,D210,D211,D212,D213,D214,D215,D300,D301,D302,D400,D401,D402,D403,D404,D405,D406,D407,D408,D409,D410,D411,D412,D413,D414
21+
ignore=D100,D101,D102,D103,D104,D105,D106,D107,D200,D201,D202,D203,D204,D205,D206,D207,D208,D209,D210,D211,D212,D213,D214,D215,D300,D301,D302,D400,D401,D402,D403,D404,D405,D406,D407,D408,D409,D410,D411,D412,D413,D414

0 commit comments

Comments
 (0)