Skip to content

Commit

Permalink
Update scalafmt-core to 3.8.5 (#1290)
Browse files Browse the repository at this point in the history
* Update scalafmt-core to 3.8.5

* Reformat with scalafmt 3.8.5

Executed command: scalafmt --non-interactive

* Add 'Reformat with scalafmt 3.8.5' to .git-blame-ignore-revs

---------

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
  • Loading branch information
scala-steward and mergify[bot] authored Jan 18, 2025
1 parent 326c35d commit 6dba410
Show file tree
Hide file tree
Showing 12 changed files with 19 additions and 21 deletions.
3 changes: 3 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,6 @@

# Scala Steward: Reformat with scalafmt 3.7.2
4cbeb9075357d54afd60d51f7ad0c9835d5f9f99

# Scala Steward: Reformat with scalafmt 3.8.5
11a3bcb191d4d2701361b5fee5ae5396593d6872
2 changes: 1 addition & 1 deletion .scalafmt.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version=3.8.3
version=3.8.5

maxColumn = 120

Expand Down
3 changes: 1 addition & 2 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ lazy val commonSettings = Def.settings(
compilerPlugin("com.olegpy" %% "better-monadic-for" % "0.3.1")
).filterNot(_ => scalaVersion.value.startsWith("3.")),
Seq(Compile, Test).map { config =>
(config / unmanagedSourceDirectories) ++= {
(config / unmanagedSourceDirectories) ++=
(config / unmanagedSourceDirectories).value.flatMap { dir: File =>
dir.getName match {
case "scala" =>
Expand All @@ -312,6 +312,5 @@ lazy val commonSettings = Def.settings(
case _ => Seq(dir)
}
}
}
}
)
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ class NewDynamoDBConsumerSpec
.take(nRecords)
// emulate message processing latency to reproduce the situation when End of Shard arrives BEFORE
// all in-flight records are done
.parEvalMap(3)(msg => IO.sleep(200 millis) >> IO.pure(msg))
.parEvalMap(3)(msg => IO.sleep(200.millis) >> IO.pure(msg))
.through(
k.checkpointRecords(
KinesisCheckpointSettings(maxBatchSize = Int.MaxValue, maxBatchWait = 500.millis)
Expand Down Expand Up @@ -442,7 +442,7 @@ class NewDynamoDBConsumerSpec
.build
.map(stream =>
stream
.evalTap(_ => IO.sleep(100 millis))
.evalTap(_ => IO.sleep(100.millis))
.map(i => if (errorStream) throw new Exception("boom") else i)
.onFinalize(IO.delay(latch.countDown()))
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class StreamScanSpec extends AnyWordSpec with Matchers with ScalaFutures {
PatienceConfig(timeout = scaled(Span(2, Minutes)), interval = scaled(Span(1, Second)))

"DynamoDB scan" should {
"produce fs2 Stream form DDB scan operation" in {
"produce fs2 Stream form DDB scan operation" in
resourcesF
.use { case (tableName, ddb) =>
for {
Expand Down Expand Up @@ -54,9 +54,8 @@ class StreamScanSpec extends AnyWordSpec with Matchers with ScalaFutures {
}
.unsafeToFuture()
.futureValue
}

"fails stream on error" in {
"fails stream on error" in
resourcesF
.use { case (_, ddb) =>
StreamScan[IO](ddb)
Expand All @@ -71,7 +70,6 @@ class StreamScanSpec extends AnyWordSpec with Matchers with ScalaFutures {
}
.unsafeToFuture()
.futureValue
}
}
def resourcesF: Resource[IO, (String, DynamoDbAsyncClientOp[IO])] =
for {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ object KinesisExample extends IOApp {
): F[Unit] =
(
Stream
.awakeEvery[F](5 seconds)
.awakeEvery[F](5.seconds)
.map(_.toString())
.evalTap(d => Sync[F].delay(println(s"Producing $d")))
.map(d => (d, ByteBuffer.wrap(d.getBytes)))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ object KinesisExampleNew extends IOApp {
): F[Unit] =
(
Stream
.awakeEvery[F](5 seconds)
.awakeEvery[F](5.seconds)
.take(15)
.map(_.toString())
.evalTap(d => Sync[F].delay(println(s"Producing $d")))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ object KinesisMultistreamExample extends IOApp {
(
streamNames.map { streamName =>
Stream
.awakeEvery[F](5 seconds)
.awakeEvery[F](5.seconds)
.take(5)
.map(e => s"$e -> $streamName")
.evalTap(d => Sync[F].delay(println(s"Producing $d")))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ object PureAWSKleisli extends IOApp {
.build()
)
_ <- snsOp.publish(PublishRequest.builder().message("Barry").topicArn(topicArn).build())
_ <- Temporal[F].sleep(5 seconds)
_ <- Temporal[F].sleep(5.seconds)
msg <- sqsOp
.receiveMessage(
ReceiveMessageRequest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ class NewKinesisConsumerSpec
.take(nRecords.toLong)
// emulate message processing latency to reproduce the situation when End of Shard arrives BEFORE
// all in-flight records are done
.parEvalMap(3)(msg => IO.sleep(200 millis) >> IO.pure(msg))
.parEvalMap(3)(msg => IO.sleep(200.millis) >> IO.pure(msg))
.through(
k.checkpointRecords(
KinesisCheckpointSettings(maxBatchSize = Int.MaxValue, maxBatchWait = 500.millis)
Expand Down Expand Up @@ -440,7 +440,7 @@ class NewKinesisConsumerSpec
.build
.map(stream =>
stream
.evalTap(_ => IO.sleep(100 millis))
.evalTap(_ => IO.sleep(100.millis))
.map(i => if (errorStream) throw new Exception("boom") else i)
.onFinalize(IO.delay(latch.countDown()))
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ class NewLocalStackSuite extends AnyFlatSpec with Matchers with ScalaFutures {
IO.raiseError(new RuntimeException("Expected 2 shards"))
else IO.unit
},
2 seconds,
2.seconds,
_.*(2),
5,
_.getMessage == "Expected 2 shards"
Expand Down
8 changes: 3 additions & 5 deletions fs2-aws-sqs/src/test/scala/fs2/aws/sqs/SqsSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,15 @@ class SqsSpec extends AnyWordSpec with Matchers with BeforeAndAfterAll {
.unsafeRunSync()

"SQS" should {
"publish messages" in {
"publish messages" in
sqsOpResource
.use { sqsOp =>
(for {

sqs <- fs2.Stream.eval(
SQS
.create[IO](
SqsConfig(queueUrl = queueUrl, pollRate = 10 milliseconds),
SqsConfig(queueUrl = queueUrl, pollRate = 10.milliseconds),
sqsOp
)
)
Expand All @@ -62,8 +62,6 @@ class SqsSpec extends AnyWordSpec with Matchers with BeforeAndAfterAll {
}
.unsafeRunSync()

}

"stream messages" in {
val r = sqsOpResource
.use { sqsOp =>
Expand All @@ -73,7 +71,7 @@ class SqsSpec extends AnyWordSpec with Matchers with BeforeAndAfterAll {
.create[IO](
SqsConfig(
queueUrl = queueUrl,
pollRate = 10 milliseconds,
pollRate = 10.milliseconds,
fetchMessageCount = 1
),
sqsOp
Expand Down

0 comments on commit 6dba410

Please sign in to comment.