Skip to content

Commit a32b97b

Browse files
Update scalafmt-core to 3.8.3 (#508)
* Update scalafmt-core to 3.8.3 * Reformat with scalafmt 3.8.3 Executed command: scalafmt --non-interactive * Add 'Reformat with scalafmt 3.8.3' to .git-blame-ignore-revs
1 parent d5cf14a commit a32b97b

File tree

9 files changed

+45
-11
lines changed

9 files changed

+45
-11
lines changed

.git-blame-ignore-revs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
11
# Scala Steward: Reformat with scalafmt 3.6.0
22
49896fb5557f065fbd41afbd74085f49177aa3d4
3+
4+
# Scala Steward: Reformat with scalafmt 3.8.3
5+
585dfcc18c2106ab35f69e495627a0bc5770caaa

.scalafmt.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
version = "3.6.1"
1+
version = "3.8.3"
22
runner.dialect = scala213
33
maxColumn = 140
44
align.preset = some

oauth2-cache-future/shared/src/main/scala/com/ocadotechnology/sttp/oauth2/cache/future/MonixFutureCache.scala

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,11 @@ import cats.implicits._
1010
import scala.concurrent.ExecutionContext
1111
import cats.data.OptionT
1212

13-
final class MonixFutureCache[K, V](timeProvider: TimeProvider)(implicit ec: ExecutionContext) extends ExpiringCache[Future, K, V] {
13+
final class MonixFutureCache[K, V](
14+
timeProvider: TimeProvider
15+
)(
16+
implicit ec: ExecutionContext
17+
) extends ExpiringCache[Future, K, V] {
1418
private val ref: AtomicAny[Map[K, Entry[V]]] = AtomicAny(Map.empty[K, Entry[V]])
1519

1620
override def get(key: K): Future[Option[V]] =
@@ -41,6 +45,11 @@ final class MonixFutureCache[K, V](timeProvider: TimeProvider)(implicit ec: Exec
4145
object MonixFutureCache {
4246
final case class Entry[V](value: V, expirationTime: Instant)
4347

44-
def apply[K, V](timeProvider: TimeProvider = TimeProvider.default)(implicit ec: ExecutionContext): MonixFutureCache[K, V] =
48+
def apply[K, V](
49+
timeProvider: TimeProvider = TimeProvider.default
50+
)(
51+
implicit ec: ExecutionContext
52+
): MonixFutureCache[K, V] =
4553
new MonixFutureCache[K, V](timeProvider)
54+
4655
}

oauth2-circe/shared/src/main/scala/com/ocadotechnology/sttp/oauth2/json/circe/CirceJsonDecoders.scala

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@ import scala.concurrent.duration.FiniteDuration
2424

2525
trait CirceJsonDecoders {
2626

27-
implicit def jsonDecoder[A](implicit decoder: Decoder[A]): JsonDecoder[A] =
27+
implicit def jsonDecoder[A](
28+
implicit decoder: Decoder[A]
29+
): JsonDecoder[A] =
2830
(data: String) => io.circe.parser.decode[A](data).leftMap(error => JsonDecoder.Error(error.getMessage, cause = Some(error)))
2931

3032
implicit val optionScopeDecoder: Decoder[Option[Scope]] =

oauth2-jsoniter/shared/src/main/scala/com/ocadotechnology/sttp/oauth2/json/jsoniter/JsoniterJsonDecoders.scala

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,9 @@ import scala.util.control.NonFatal
3131

3232
trait JsoniterJsonDecoders {
3333

34-
implicit def jsonDecoder[A](implicit jsonCodec: JsonValueCodec[A]): JsonDecoder[A] =
34+
implicit def jsonDecoder[A](
35+
implicit jsonCodec: JsonValueCodec[A]
36+
): JsonDecoder[A] =
3537
(data: String) =>
3638
Try(readFromString[A](data)) match {
3739
case Success(value) =>
@@ -123,10 +125,18 @@ trait JsoniterJsonDecoders {
123125
implicit val refreshTokenResponseDecoder: JsonValueCodec[RefreshTokenResponse] =
124126
JsonCodecMaker.make(CodecMakerConfig.withFieldNameMapper(JsonCodecMaker.enforce_snake_case))
125127

126-
private def customDecoderFromUnsafe[A](read: JsonReader => A)(implicit toNull: Null <:< A): JsonValueCodec[A] =
128+
private def customDecoderFromUnsafe[A](
129+
read: JsonReader => A
130+
)(
131+
implicit toNull: Null <:< A
132+
): JsonValueCodec[A] =
127133
customDecoderTry[A](reader => Try(read(reader)))
128134

129-
private def customDecoderTry[A](read: JsonReader => Try[A])(implicit toNull: Null <:< A): JsonValueCodec[A] =
135+
private def customDecoderTry[A](
136+
read: JsonReader => Try[A]
137+
)(
138+
implicit toNull: Null <:< A
139+
): JsonValueCodec[A] =
130140
customDecoderWithDefault[A](read)(toNull(null))
131141

132142
private def customDecoderWithDefault[A](read: JsonReader => Try[A])(default: A) = new JsonValueCodec[A] {

oauth2/shared/src/main/scala/com/ocadotechnology/sttp/oauth2/AuthorizationCodeProvider.scala

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,9 @@ trait AuthorizationCodeProvider[UriType, F[_]] {
7575

7676
object AuthorizationCodeProvider {
7777

78-
def apply[U, F[_]](implicit ev: AuthorizationCodeProvider[U, F]): AuthorizationCodeProvider[U, F] = ev
78+
def apply[U, F[_]](
79+
implicit ev: AuthorizationCodeProvider[U, F]
80+
): AuthorizationCodeProvider[U, F] = ev
7981

8082
/*
8183
Structure describing endpoints configuration for selected oauth2 provider

oauth2/shared/src/main/scala/com/ocadotechnology/sttp/oauth2/PasswordGrantProvider.scala

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ trait PasswordGrantProvider[F[_]] {
1717

1818
object PasswordGrantProvider {
1919

20-
def apply[F[_]](implicit ev: PasswordGrantProvider[F]): PasswordGrantProvider[F] = ev
20+
def apply[F[_]](
21+
implicit ev: PasswordGrantProvider[F]
22+
): PasswordGrantProvider[F] = ev
2123

2224
def apply[F[_]](
2325
tokenUrl: Uri,

oauth2/shared/src/main/scala/com/ocadotechnology/sttp/oauth2/UserInfoProvider.scala

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@ trait UserInfoProvider[F[_]] {
1414
}
1515

1616
object UserInfoProvider {
17-
def apply[F[_]](implicit ev: UserInfoProvider[F]): UserInfoProvider[F] = ev
17+
18+
def apply[F[_]](
19+
implicit ev: UserInfoProvider[F]
20+
): UserInfoProvider[F] = ev
1821

1922
private def requestUserInfo[F[_]](
2023
baseUrl: Uri,

oauth2/shared/src/main/scala/com/ocadotechnology/sttp/oauth2/json/JsonDecoder.scala

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,10 @@ trait JsonDecoder[A] {
77
}
88

99
object JsonDecoder {
10-
def apply[A](implicit ev: JsonDecoder[A]): JsonDecoder[A] = ev
10+
11+
def apply[A](
12+
implicit ev: JsonDecoder[A]
13+
): JsonDecoder[A] = ev
1114

1215
final case class Error(message: String, cause: Option[Throwable] = None) extends Exception(message, cause.orNull)
1316

0 commit comments

Comments
 (0)