You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@spark.apache.org by do...@apache.org on 2023/01/03 23:02:27 UTC

[spark] branch branch-3.2 updated: [SPARK-41863][INFRA][PYTHON][TESTS] Skip `flake8` tests if the command is not available

This is an automated email from the ASF dual-hosted git repository.

dongjoon pushed a commit to branch branch-3.2
in repository https://gitbox.apache.org/repos/asf/spark.git


The following commit(s) were added to refs/heads/branch-3.2 by this push:
     new ad2d42709ab [SPARK-41863][INFRA][PYTHON][TESTS] Skip `flake8` tests if the command is not available
ad2d42709ab is described below

commit ad2d42709abfc8f8ad27f836c811a4b75ef32ee9
Author: Dongjoon Hyun <do...@apache.org>
AuthorDate: Tue Jan 3 15:01:43 2023 -0800

    [SPARK-41863][INFRA][PYTHON][TESTS] Skip `flake8` tests if the command is not available
    
    ### What changes were proposed in this pull request?
    
    This PR aims to skip `flake8` tests if the command is not available.
    
    ### Why are the changes needed?
    
    Linters are optional modules and we can be skip in some systems like `mypy`.
    ```
    $ dev/lint-python
    starting python compilation test...
    python compilation succeeded.
    
    The Python library providing 'black' module was not found. Skipping black checks for now.
    
    The flake8 command was not found. Skipping for now.
    The mypy command was not found. Skipping for now.
    
    all lint-python tests passed!
    ```
    
    ### Does this PR introduce _any_ user-facing change?
    
    No.
    
    ### How was this patch tested?
    
    Manual tests.
    
    Closes #39372 from dongjoon-hyun/SPARK-41863.
    
    Authored-by: Dongjoon Hyun <do...@apache.org>
    Signed-off-by: Dongjoon Hyun <do...@apache.org>
    (cherry picked from commit 1a5ef40a4d59b377b028b55ea3805caf5d55f28f)
    Signed-off-by: Dongjoon Hyun <do...@apache.org>
---
 dev/lint-python | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/dev/lint-python b/dev/lint-python
index e54e391c587..031b34f4af9 100755
--- a/dev/lint-python
+++ b/dev/lint-python
@@ -164,9 +164,8 @@ function flake8_test {
     local FLAKE8_STATUS=
 
     if ! hash "$FLAKE8_BUILD" 2> /dev/null; then
-        echo "The flake8 command was not found."
-        echo "flake8 checks failed."
-        exit 1
+        echo "The flake8 command was not found. Skipping for now."
+        return
     fi
 
     _FLAKE8_VERSION=($($FLAKE8_BUILD --version))


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@spark.apache.org
For additional commands, e-mail: commits-help@spark.apache.org