Skip to content

Commit aa5b4b5

Browse files
committed
[SPARK-2627] follow Spark bash style for if blocks
“then” goes on the same line as the opening “if”.
1 parent d0a83b9 commit aa5b4b5

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

dev/lint-python

+8-10
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,9 @@ PEP8_SCRIPT_REMOTE_PATH="https://raw.githubusercontent.com/jcrocholl/pep8/1.5.7/
3434
curl --silent -o "$PEP8_SCRIPT_PATH" "$PEP8_SCRIPT_REMOTE_PATH"
3535
curl_status=$?
3636

37-
if [ $curl_status -ne 0 ]
38-
then
39-
echo "Failed to download pep8.py from \"$PEP8_SCRIPT_REMOTE_PATH\"."
40-
exit $curl_status
37+
if [ $curl_status -ne 0 ]; then
38+
echo "Failed to download pep8.py from \"$PEP8_SCRIPT_REMOTE_PATH\"."
39+
exit $curl_status
4140
fi
4241

4342

@@ -49,12 +48,11 @@ python $PEP8_SCRIPT_PATH ./python --exclude="cloudpickle.py" \
4948
> "$PEP8_REPORT_PATH"
5049
pep8_status=${PIPESTATUS[0]} #$?
5150

52-
if [ $pep8_status -ne 0 ]
53-
then
54-
echo "PEP 8 checks failed."
55-
cat "$PEP8_REPORT_PATH"
56-
else
57-
echo "PEP 8 checks passed."
51+
if [ $pep8_status -ne 0 ]; then
52+
echo "PEP 8 checks failed."
53+
cat "$PEP8_REPORT_PATH"
54+
else
55+
echo "PEP 8 checks passed."
5856
fi
5957

6058
rm -f "$PEP8_REPORT_PATH"

0 commit comments

Comments
 (0)