Repository: spark Updated Branches: refs/heads/branch-2.4 59054fa89 -> d3f5475a1
[SPARK-25238][PYTHON] lint-python: Upgrade pycodestyle to v2.4.0 See https://pycodestyle.readthedocs.io/en/latest/developer.html#changes for changes made in this release. ## What changes were proposed in this pull request? Upgrade pycodestyle to v2.4.0 ## How was this patch tested? __pycodestyle__ Please review http://spark.apache.org/contributing.html before opening a pull request. Closes #22231 from cclauss/patch-1. Authored-by: cclauss <ccla...@bluewin.ch> Signed-off-by: Sean Owen <sean.o...@databricks.com> (cherry picked from commit 9bb798f2e6eefd9edb7b6d9980a894557c107bd3) Signed-off-by: Sean Owen <sean.o...@databricks.com> Project: http://git-wip-us.apache.org/repos/asf/spark/repo Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/d3f5475a Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/d3f5475a Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/d3f5475a Branch: refs/heads/branch-2.4 Commit: d3f5475a1a9efc1dcffbf5a4697f8431b0588e9e Parents: 59054fa Author: cclauss <ccla...@bluewin.ch> Authored: Fri Sep 14 20:13:07 2018 -0500 Committer: Sean Owen <sean.o...@databricks.com> Committed: Fri Sep 14 20:13:16 2018 -0500 ---------------------------------------------------------------------- dev/lint-python | 2 +- dev/run-tests-jenkins.py | 4 ++-- dev/tox.ini | 2 +- python/pyspark/sql/functions.py | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/spark/blob/d3f5475a/dev/lint-python ---------------------------------------------------------------------- diff --git a/dev/lint-python b/dev/lint-python index f738af9..1e944b0 100755 --- a/dev/lint-python +++ b/dev/lint-python @@ -36,7 +36,7 @@ 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 the latest official version of pep8. pep8 is formally renamed to pycodestyle. -PYCODESTYLE_VERSION="2.3.1" +PYCODESTYLE_VERSION="2.4.0" 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" http://git-wip-us.apache.org/repos/asf/spark/blob/d3f5475a/dev/run-tests-jenkins.py ---------------------------------------------------------------------- diff --git a/dev/run-tests-jenkins.py b/dev/run-tests-jenkins.py index 6e94389..eca88f2 100755 --- a/dev/run-tests-jenkins.py +++ b/dev/run-tests-jenkins.py @@ -116,7 +116,7 @@ def run_tests(tests_timeout): failure_note_by_errcode = { # error to denote run-tests script failures: - 1: 'executing the `dev/run-tests` script', # noqa: W605 + 1: 'executing the `dev/run-tests` script', ERROR_CODES["BLOCK_GENERAL"]: 'some tests', ERROR_CODES["BLOCK_RAT"]: 'RAT tests', ERROR_CODES["BLOCK_SCALA_STYLE"]: 'Scala style tests', @@ -131,7 +131,7 @@ def run_tests(tests_timeout): ERROR_CODES["BLOCK_PYSPARK_UNIT_TESTS"]: 'PySpark unit tests', ERROR_CODES["BLOCK_PYSPARK_PIP_TESTS"]: 'PySpark pip packaging tests', ERROR_CODES["BLOCK_SPARKR_UNIT_TESTS"]: 'SparkR unit tests', - ERROR_CODES["BLOCK_TIMEOUT"]: 'from timeout after a configured wait of \`%s\`' % ( + ERROR_CODES["BLOCK_TIMEOUT"]: 'from timeout after a configured wait of `%s`' % ( tests_timeout) } http://git-wip-us.apache.org/repos/asf/spark/blob/d3f5475a/dev/tox.ini ---------------------------------------------------------------------- diff --git a/dev/tox.ini b/dev/tox.ini index 28dad8f..6ec223b 100644 --- a/dev/tox.ini +++ b/dev/tox.ini @@ -14,6 +14,6 @@ # limitations under the License. [pycodestyle] -ignore=E402,E731,E241,W503,E226,E722,E741,E305 +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/* http://git-wip-us.apache.org/repos/asf/spark/blob/d3f5475a/python/pyspark/sql/functions.py ---------------------------------------------------------------------- diff --git a/python/pyspark/sql/functions.py b/python/pyspark/sql/functions.py index e288ec8..6da5237 100644 --- a/python/pyspark/sql/functions.py +++ b/python/pyspark/sql/functions.py @@ -1711,7 +1711,7 @@ def regexp_extract(str, pattern, idx): @ignore_unicode_prefix @since(1.5) def regexp_replace(str, pattern, replacement): - """Replace all substrings of the specified string value that match regexp with rep. + r"""Replace all substrings of the specified string value that match regexp with rep. >>> df = spark.createDataFrame([('100-200',)], ['str']) >>> df.select(regexp_replace('str', r'(\d+)', '--').alias('d')).collect() --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@spark.apache.org For additional commands, e-mail: commits-h...@spark.apache.org