You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by sr...@apache.org on 2018/09/15 01:13:11 UTC

spark git commit: [SPARK-25238][PYTHON] lint-python: Upgrade pycodestyle to v2.4.0

Repository: spark
Updated Branches:
  refs/heads/master 9c25d7f73 -> 9bb798f2e


[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 <cc...@bluewin.ch>
Signed-off-by: Sean Owen <se...@databricks.com>


Project: http://git-wip-us.apache.org/repos/asf/spark/repo
Commit: http://git-wip-us.apache.org/repos/asf/spark/commit/9bb798f2
Tree: http://git-wip-us.apache.org/repos/asf/spark/tree/9bb798f2
Diff: http://git-wip-us.apache.org/repos/asf/spark/diff/9bb798f2

Branch: refs/heads/master
Commit: 9bb798f2e6eefd9edb7b6d9980a894557c107bd3
Parents: 9c25d7f
Author: cclauss <cc...@bluewin.ch>
Authored: Fri Sep 14 20:13:07 2018 -0500
Committer: Sean Owen <se...@databricks.com>
Committed: Fri Sep 14 20:13:07 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/9bb798f2/dev/lint-python
----------------------------------------------------------------------
diff --git a/dev/lint-python b/dev/lint-python
index a98a251..e26bd4b 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/9bb798f2/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/9bb798f2/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/9bb798f2/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-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org