Skip to content

Commit 89c2432

Browse files
author
Davies Liu
committed
fix style
1 parent bd20780 commit 89c2432

File tree

2 files changed

+9
-13
lines changed

2 files changed

+9
-13
lines changed

python/pyspark/streaming/dstream.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ def takeAndPrint(time, rdd):
176176
print(record)
177177
if len(taken) > num:
178178
print("...")
179-
print("")
179+
print()
180180

181181
self.foreachRDD(takeAndPrint)
182182

sql/catalyst/src/test/scala/org/apache/spark/sql/catalyst/expressions/LiteralExpressionSuite.scala

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -45,24 +45,20 @@ class LiteralExpressionSuite extends SparkFunSuite with ExpressionEvalHelper {
4545
}
4646

4747
test("int literals") {
48-
List(0, 1, Int.MinValue, Int.MaxValue).foreach {
49-
d => {
50-
checkEvaluation(Literal(d), d)
51-
checkEvaluation(Literal(d.toLong), d.toLong)
52-
checkEvaluation(Literal(d.toShort), d.toShort)
53-
checkEvaluation(Literal(d.toByte), d.toByte)
54-
}
48+
List(0, 1, Int.MinValue, Int.MaxValue).foreach { d =>
49+
checkEvaluation(Literal(d), d)
50+
checkEvaluation(Literal(d.toLong), d.toLong)
51+
checkEvaluation(Literal(d.toShort), d.toShort)
52+
checkEvaluation(Literal(d.toByte), d.toByte)
5553
}
5654
checkEvaluation(Literal(Long.MinValue), Long.MinValue)
5755
checkEvaluation(Literal(Long.MaxValue), Long.MaxValue)
5856
}
5957

6058
test("double literals") {
61-
List(0.0, -0.0, Double.NegativeInfinity, Double.PositiveInfinity).foreach {
62-
d => {
63-
checkEvaluation(Literal(d), d)
64-
checkEvaluation(Literal(d.toFloat), d.toFloat)
65-
}
59+
List(0.0, -0.0, Double.NegativeInfinity, Double.PositiveInfinity).foreach { d =>
60+
checkEvaluation(Literal(d), d)
61+
checkEvaluation(Literal(d.toFloat), d.toFloat)
6662
}
6763
checkEvaluation(Literal(Double.MinValue), Double.MinValue)
6864
checkEvaluation(Literal(Double.MaxValue), Double.MaxValue)

0 commit comments

Comments
 (0)