Skip to content

Commit

Permalink
Update scalafmt-core to 3.7.17 (softwaremill#3324)
Browse files Browse the repository at this point in the history
  • Loading branch information
softwaremill-ci committed Nov 23, 2023
1 parent 9ac47f0 commit fdfa3da
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 13 deletions.
3 changes: 3 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
Expand Up @@ -39,3 +39,6 @@ c40dbf3aafd72299a21b38125140249337c83e0f

# Scala Steward: Reformat with scalafmt 3.7.15
8b7ad6880d140468abf749eb7a5556dc7cd8d999

# Scala Steward: Reformat with scalafmt 3.7.17
ab79cadbb13aac7c32015ce5caf24d57290ee59b
2 changes: 1 addition & 1 deletion .scalafmt.conf
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version = 3.7.15
version = 3.7.17
maxColumn = 140
runner.dialect = scala3
fileOverride {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -146,8 +146,10 @@ private[play] class EndpointToPlayClient(clientOptions: PlayClientOptions, ws: S
case a: EndpointInput.Auth[_, _] => setInputParams(a.input, params, req)
case EndpointInput.Pair(left, right, _, split) => handleInputPair(left, right, params, split, req)
case EndpointIO.Pair(left, right, _, split) => handleInputPair(left, right, params, split, req)
case EndpointInput.MappedPair(wrapped, codec) => handleMapped(wrapped.asInstanceOf[EndpointInput[Any]], codec.asInstanceOf[Mapping[Any, Any]], params, req)
case EndpointIO.MappedPair(wrapped, codec) => handleMapped(wrapped.asInstanceOf[EndpointInput[Any]], codec.asInstanceOf[Mapping[Any, Any]], params, req)
case EndpointInput.MappedPair(wrapped, codec) =>
handleMapped(wrapped.asInstanceOf[EndpointInput[Any]], codec.asInstanceOf[Mapping[Any, Any]], params, req)
case EndpointIO.MappedPair(wrapped, codec) =>
handleMapped(wrapped.asInstanceOf[EndpointInput[Any]], codec.asInstanceOf[Mapping[Any, Any]], params, req)
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import sttp.tapir.integ.cats.effect.CatsMonadError
private class CatsMonadAsyncError[F[_]](implicit F: Async[F]) extends CatsMonadError[F] with MonadAsyncError[F] {
override def async[T](register: ((Either[Throwable, T]) => Unit) => Canceler): F[T] =
F.async(cb => F.delay(register(cb)).map(c => Some(F.delay(c.cancel()))))
override def blocking[T](t: => T): F[T] =

override def blocking[T](t: => T): F[T] =
F.blocking(t)
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,10 @@ class JdkHttpTestServerInterpreter() extends TestServerInterpreter[Id, Any, JdkH
JdkHttpServerInterpreter(serverOptions).toHandler(es)
}

override def serverWithStop(routes: NonEmptyList[HttpHandler], gracefulShutdownTimeout: Option[FiniteDuration]): Resource[IO, (Port, KillSwitch)] = {
override def serverWithStop(
routes: NonEmptyList[HttpHandler],
gracefulShutdownTimeout: Option[FiniteDuration]
): Resource[IO, (Port, KillSwitch)] = {
val server = IO.blocking {
val server = HttpServer.create(new InetSocketAddress(0), 0)

Expand All @@ -44,6 +47,8 @@ class JdkHttpTestServerInterpreter() extends TestServerInterpreter[Id, Any, JdkH
}

Resource
.make(server.map(s => (s.getAddress.getPort, IO.blocking(s.stop(gracefulShutdownTimeout.map(_.toSeconds.toInt).getOrElse(0)))))) { case (_, release) => release }
.make(server.map(s => (s.getAddress.getPort, IO.blocking(s.stop(gracefulShutdownTimeout.map(_.toSeconds.toInt).getOrElse(0)))))) {
case (_, release) => release
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ case class NettyFutureServer(routes: Vector[FutureRoute], options: NettyFutureSe
channelGroup: ChannelGroup,
startNanos: Long,
gracefulShutdownTimeoutNanos: Option[Long]
): Future[Unit] =
): Future[Unit] =
if (!channelGroup.isEmpty && gracefulShutdownTimeoutNanos.exists(_ >= System.nanoTime() - startNanos)) {
Future {
blocking {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ import sttp.tapir.tests._

import scala.concurrent.duration._

class ServerGracefulShutdownTests[F[_], OPTIONS, ROUTE](createServerTest: CreateServerTest[F, Any, OPTIONS, ROUTE], sleeper: Sleeper[F])(implicit
m: MonadError[F]
class ServerGracefulShutdownTests[F[_], OPTIONS, ROUTE](createServerTest: CreateServerTest[F, Any, OPTIONS, ROUTE], sleeper: Sleeper[F])(
implicit m: MonadError[F]
) extends EitherValues {
import createServerTest._

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,9 @@ object ContentNegotiation {

val in_multipart_mixed_out_string: PublicEndpoint[String, Unit, String, Any] =
endpoint.get
.in("content-negotiation" / "multipart-mixed")
.in(sttp.tapir.oneOfBody(ContentTypeRange("multipart", "mixed", "*") -> stringBody))
.out(stringBody)
.in("content-negotiation" / "multipart-mixed")
.in(sttp.tapir.oneOfBody(ContentTypeRange("multipart", "mixed", "*") -> stringBody))
.out(stringBody)

val out_default_json_or_xml: PublicEndpoint[Unit, Unit, Organization, Any] =
endpoint.get
Expand Down

0 comments on commit fdfa3da

Please sign in to comment.