diff --git a/dev/lint-python b/dev/lint-python index a9d2a0b75ac5..d5491f244717 100755 --- a/dev/lint-python +++ b/dev/lint-python @@ -16,9 +16,6 @@ # limitations under the License. # # define test binaries + versions -PYDOCSTYLE_BUILD="pydocstyle" -MINIMUM_PYDOCSTYLE="3.0.0" - FLAKE8_BUILD="flake8" MINIMUM_FLAKE8="3.5.0" @@ -165,48 +162,6 @@ flake8 checks failed." fi } -function pydocstyle_test { - local PYDOCSTYLE_REPORT= - local PYDOCSTYLE_STATUS= - local PYDOCSTYLE_VERSION= - local EXPECTED_PYDOCSTYLE= - - # Exclude auto-generated configuration file. - local DOC_PATHS_TO_CHECK="$( cd "${SPARK_ROOT_DIR}" && find . -name "*.py" | grep -vF 'functions.py' )" - - # Check python document style, skip check if pydocstyle is not installed. - if ! hash "$PYDOCSTYLE_BUILD" 2> /dev/null; then - echo "The pydocstyle command was not found. Skipping pydocstyle checks for now." - echo - return - fi - - PYDOCSTYLE_VERSION="$($PYDOCSTYLE_BUILD --version)" - EXPECTED_PYDOCSTYLE="$(satisfies_min_version $PYDOCSTYLE_VERSION $MINIMUM_PYDOCSTYLE)" - - if [[ "$EXPECTED_PYDOCSTYLE" == "False" ]]; then - echo "\ -The minimum version of pydocstyle needs to be $MINIMUM_PYDOCSTYLE. -Your current version is $PYDOCSTYLE_VERSION. -Skipping pydocstyle checks for now." - echo - return - fi - - echo "starting $PYDOCSTYLE_BUILD test..." - PYDOCSTYLE_REPORT=$( ($PYDOCSTYLE_BUILD --config=dev/tox.ini $DOC_PATHS_TO_CHECK) 2>&1) - PYDOCSTYLE_STATUS=$? - - if [ "$PYDOCSTYLE_STATUS" -ne 0 ]; then - echo "pydocstyle checks failed:" - echo "$PYDOCSTYLE_REPORT" - exit "$PYDOCSTYLE_STATUS" - else - echo "pydocstyle checks passed." - echo - fi -} - function sphinx_test { local SPHINX_REPORT= local SPHINX_STATUS= @@ -252,7 +207,6 @@ PYTHON_SOURCE="$(find . -name "*.py")" compile_python_test "$PYTHON_SOURCE" pycodestyle_test "$PYTHON_SOURCE" flake8_test -pydocstyle_test sphinx_test echo diff --git a/dev/tox.ini b/dev/tox.ini index 54f65692c830..3ee13c09b5de 100644 --- a/dev/tox.ini +++ b/dev/tox.ini @@ -17,5 +17,3 @@ ignore=E226,E241,E305,E402,E722,E731,E741,W503,W504 max-line-length=100 exclude=cloudpickle.py,heapq3.py,shared.py,python/docs/conf.py,work/*/*.py,python/.eggs/*,dist/*,.git/* -[pydocstyle] -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