Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update scalafmt-core to 3.8.5 #958

Merged
merged 3 commits into from
Jan 19, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,6 @@ d91037fb5c5c3d6f4c5ee6ed994331763a8fbacb

# Scala Steward: Reformat with scalafmt 3.8.2
23009fa5e4e0e26398cc931a236add25d4394e0f

# Scala Steward: Reformat with scalafmt 3.8.5
7f5ea5c2ddcf2e0bd3810a9240f4df42b05bbb8b
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
runner.dialect = scala213
project.git = true
style = defaultWithAlign
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,8 @@ class PekkoHttpClientSpec extends AnyWordSpec with Matchers with OptionValues {
pekkoClient.connectionSettings.connectionSettings.connectingTimeout shouldBe
SdkHttpConfigurationOption.GLOBAL_HTTP_DEFAULTS.get(SdkHttpConfigurationOption.CONNECTION_TIMEOUT).asScala
pekkoClient.connectionSettings.connectionSettings.idleTimeout shouldBe
SdkHttpConfigurationOption.GLOBAL_HTTP_DEFAULTS.get(SdkHttpConfigurationOption.CONNECTION_MAX_IDLE_TIMEOUT).asScala
SdkHttpConfigurationOption.GLOBAL_HTTP_DEFAULTS.get(
SdkHttpConfigurationOption.CONNECTION_MAX_IDLE_TIMEOUT).asScala
pekkoClient.connectionSettings.maxConnections shouldBe
SdkHttpConfigurationOption.GLOBAL_HTTP_DEFAULTS.get(SdkHttpConfigurationOption.MAX_CONNECTIONS).intValue()
infiniteToZero(pekkoClient.connectionSettings.maxConnectionLifetime) shouldBe
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ class TestS3 extends BaseAwsClientTest[S3AsyncClient] {

"upload and download a file to a bucket" in withClient { implicit client =>
val bucketName = createBucket()
val fileContent = 0 to 1000 mkString
val fileContent = (0 to 1000).mkString

client
.putObject(PutObjectRequest.builder().bucket(bucketName).key("my-file").contentType("text/plain").build(),
Expand Down Expand Up @@ -73,7 +73,8 @@ class TestS3 extends BaseAwsClientTest[S3AsyncClient] {
.join()

val p1 = client
.uploadPart(UploadPartRequest
.uploadPart(
UploadPartRequest
.builder()
.bucket(bucketName)
.key("bar")
Expand All @@ -83,7 +84,8 @@ class TestS3 extends BaseAwsClientTest[S3AsyncClient] {
randomFile.toPath)
.join
val p2 = client
.uploadPart(UploadPartRequest
.uploadPart(
UploadPartRequest
.builder()
.bucket(bucketName)
.key("bar")
Expand Down Expand Up @@ -184,5 +186,5 @@ class TestS3 extends BaseAwsClientTest[S3AsyncClient] {
override lazy val container: GenericContainer = new GenericContainer(
dockerImage = "adobe/s3mock:2.17.0",
exposedPorts = Seq(exposedServicePort),
waitStrategy = Some(TimeoutWaitStrategy(10 seconds)))
waitStrategy = Some(TimeoutWaitStrategy(10.seconds)))
}
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,8 @@ object ElasticsearchFlow {

@InternalApi
private def amendWithIndexFlow[T, C]: Flow[immutable.Seq[WriteMessage[T, C]],
(immutable.Seq[WriteMessage[T,
(
immutable.Seq[WriteMessage[T,
(Int,
C)]], immutable.Seq[WriteResult[T, (Int, C)]]), NotUsed] = {
Flow[immutable.Seq[WriteMessage[T, C]]].map { messages =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ private[pekko] trait ObjectEncoder {
given emptyTupleEncoder: PdxEncoder[EmptyTuple] =
PdxEncoder.instance[EmptyTuple] { case _ => true }

given tupleEncoder[K <: String, H, T <: Tuple](using
given tupleEncoder[K <: String, H, T <: Tuple](
using
m: ValueOf[K],
hEncoder: PdxEncoder[H],
tEncoder: PdxEncoder[T]): PdxEncoder[FieldType[K, H] *: T] =
Expand Down
2 changes: 1 addition & 1 deletion geode/src/test/scala/docs/scaladsl/GeodeBaseSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -56,5 +56,5 @@ class GeodeBaseSpec extends AnyWordSpec with Matchers with BeforeAndAfterAll wit
Source(range).map(i => Complex(UUID.randomUUID(), List(1, 2, 3), List(new Date()), Set(UUID.randomUUID())))

override protected def afterAll(): Unit =
Await.result(system.terminate(), 10 seconds)
Await.result(system.terminate(), 10.seconds)
}
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ class GeodeContinuousSourceSpec extends GeodeBaseSpec {
.via(flow) // geode flow
.runWith(Sink.ignore)

Await.result(f, 10 seconds)
Await.result(f, 10.seconds)

Await.result(source, 5 seconds)
Await.result(source, 5.seconds)
geode.close()
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,21 +38,21 @@ class GeodeFiniteSourceSpec extends GeodeBaseSpec {
.query[Person](s"select * from /persons order by id")
.runWith(Sink.foreach(e => log.debug(s"$e")))
// #query
Await.ready(source, 10 seconds)
Await.ready(source, 10.seconds)

val animals =
geode
.query[Animal](s"select * from /animals order by id")
.runWith(Sink.foreach(e => log.debug(s"$e")))

Await.ready(animals, 10 seconds)
Await.ready(animals, 10.seconds)

val complexes =
geode
.query[Complex](s"select * from /complexes order by id")
.runWith(Sink.foreach(e => log.debug(s"$e")))

Await.ready(complexes, 10 seconds)
Await.ready(complexes, 10.seconds)

geode.close()
}
Expand Down
4 changes: 2 additions & 2 deletions geode/src/test/scala/docs/scaladsl/GeodeFlowSpec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class GeodeFlowSpec extends GeodeBaseSpec {

val fut = source.via(flow).runWith(Sink.ignore)
// #flow
Await.ready(fut, 10 seconds)
Await.ready(fut, 10.seconds)

geode.close()
}
Expand All @@ -61,7 +61,7 @@ class GeodeFlowSpec extends GeodeBaseSpec {
val source = buildPersonsSource(1 to 20)
val flow: Flow[Person, Person, NotUsed] = geode.flow(personsRegionSettings, PersonPdxSerializer)
val fut = source.via(flow).runWith(Sink.ignore)
Await.ready(fut, 10 seconds)
Await.ready(fut, 10.seconds)
geode.close()
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ private[impl] trait HBaseCapabilities { this: StageLogging =>
* @return
*/
def connect(conf: Configuration, timeout: Int = 10) =
Await.result(Future(ConnectionFactory.createConnection(conf)), timeout seconds)
Await.result(Future(ConnectionFactory.createConnection(conf)), timeout.seconds)

private[impl] def getOrCreateTable(tableName: TableName, columnFamilies: Seq[String])(
implicit connection: Connection): Try[Table] = twr(connection.getAdmin) { admin =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -492,9 +492,10 @@ import scala.util.{ Either, Failure, Success }
registrantsByPacketId.get(packetId) match {
case Some(registration: Registration[A]) =>
registration.registrant ! event
main(registrantsByPacketId
main(
registrantsByPacketId
.updated(packetId,
registration.copy(failureReplies = failureReply +: registration.failureReplies)),
registration.copy(failureReplies = failureReply +: registration.failureReplies)),
nextPacketId,
pendingRegistrations)
case None =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1260,7 +1260,8 @@ import scala.util.{ Failure, Success, Try }
}

val retriableFlow: Flow[((Chunk, (MultipartUpload, Int)), immutable.Iterable[C]),
((Try[HttpResponse],
(
(Try[HttpResponse],
(
MultipartUpload, Int)), immutable.Iterable[C]), NotUsed] =
Flow[((Chunk, (MultipartUpload, Int)), immutable.Iterable[C])]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -190,8 +190,7 @@ private final class SolrFlowLogic[T, C](
}
}

val response = if (messages.nonEmpty) send(messages).fold(0) { _.getStatus }
else 0
val response = if (messages.nonEmpty) send(messages).fold(0) { _.getStatus } else 0

log.debug("Handle the response with {}", response)
val results = messages.map(m =>
Expand Down
Loading