HyukjinKwon commented on a change in pull request #32779:
URL: https://github.com/apache/spark/pull/32779#discussion_r645291127



##########
File path: dev/lint-python
##########
@@ -185,6 +187,35 @@ flake8 checks failed."
     fi
 }
 
+function black_test {
+    local BLACK_REPORT=
+    local BLACK_STATUS=
+
+    # Skip check if black is not installed.
+    $BLACK_BUILD 2> /dev/null
+    if [ $? -ne 0 ]; then
+        echo "The $BLACK_BUILD command was not found. Skipping black checks 
for now."
+        echo
+        return
+    fi
+
+    echo "starting black test..."
+    # Black is only applied for pandas API on Spark for now.
+    BLACK_REPORT=$( ($BLACK_BUILD python/pyspark/pandas --line-length 100 
--check ) 2>&1)
+    BLACK_STATUS=$?
+
+    if [ "$BLACK_STATUS" -ne 0 ]; then
+        echo "black checks failed:"
+        echo "$BLACK_REPORT"
+        echo "Please run 'dev/reformat' script."

Review comment:
       don't forget to fix here together.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to