Skip to content
This repository has been archived by the owner on Oct 25, 2024. It is now read-only.

Update scalafmt-core to 3.8.1 #596

Closed
Closed
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
2 changes: 2 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Scala Steward: Reformat with scalafmt 3.8.1
5ca48ad9b2b7f0ae0fda87c781db676ead8b1488
2 changes: 1 addition & 1 deletion .scalafmt.conf
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
runner.dialect=scala3

version = "3.5.9"
version = "3.8.1"
maxColumn = 140
align.preset = some
align.tokens."+" = [
Expand Down
4 changes: 3 additions & 1 deletion bootstrap/src/main/scala/org/polyvariant/Gitlab.scala
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,9 @@ trait Gitlab[F[_]] {

object Gitlab {

def apply[F[_]](using ev: Gitlab[F]): Gitlab[F] = ev
def apply[F[_]](
using ev: Gitlab[F]
): Gitlab[F] = ev

def sttpInstance[F[_]: Logger: MonadThrow](
baseUri: Uri,
Expand Down
5 changes: 4 additions & 1 deletion bootstrap/src/main/scala/org/polyvariant/Logger.scala
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ trait Logger[F[_]] {
}

object Logger {
def apply[F[_]](using ev: Logger[F]): Logger[F] = ev

def apply[F[_]](
using ev: Logger[F]
): Logger[F] = ev

def wrappedPrint[F[_]: Sync] = new Logger[F] {
private def colorPrinter(color: String)(msg: String): F[Unit] =
Expand Down
4 changes: 3 additions & 1 deletion gitlab/src/main/scala/io/pg/gitlab/Gitlab.scala
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,9 @@ trait Gitlab[F[_]] {

object Gitlab {

def apply[F[_]](using F: Gitlab[F]): Gitlab[F] = F
def apply[F[_]](
using F: Gitlab[F]
): Gitlab[F] = F

// VCS-specific MR information
// Not specific to the method of fetching (no graphql model references etc.)
Expand Down
5 changes: 4 additions & 1 deletion src/main/scala/io/pg/MergeRequests.scala
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ trait MergeRequests[F[_]] {
}

object MergeRequests {
def apply[F[_]](using F: MergeRequests[F]): MergeRequests[F] = F

def apply[F[_]](
using F: MergeRequests[F]
): MergeRequests[F] = F

import scala.util.chaining._

Expand Down
5 changes: 4 additions & 1 deletion src/main/scala/io/pg/actions.scala
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,10 @@ trait ProjectActions[F[_]] {
}

object ProjectActions {
def apply[F[_]](implicit F: ProjectActions[F]): F.type = F

def apply[F[_]](
implicit F: ProjectActions[F]
): F.type = F

def defaultResolve[F[_]: Applicative: Logger](mr: MergeRequestState): F[Option[ProjectAction]] = mr.mergeability match {
case CanMerge =>
Expand Down
6 changes: 5 additions & 1 deletion src/main/scala/io/pg/config/DiscriminatedCodec.scala
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,11 @@ object DiscriminatedCodec {
) :: deriveAll[t]
}

inline def derived[A](discriminator: String)(using inline m: Mirror.SumOf[A]): Codec.AsObject[A] = {
inline def derived[A](
discriminator: String
)(
using inline m: Mirror.SumOf[A]
): Codec.AsObject[A] = {

val codecs: List[Codec.AsObject[A]] = deriveAll[m.MirroredElemTypes].map(_.asInstanceOf[Codec.AsObject[A]])

Expand Down
5 changes: 4 additions & 1 deletion src/main/scala/io/pg/config/ProjectConfig.scala
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@ trait ProjectConfigReader[F[_]] {
}

object ProjectConfigReader {
def apply[F[_]](using F: ProjectConfigReader[F]): ProjectConfigReader[F] = F

def apply[F[_]](
using F: ProjectConfigReader[F]
): ProjectConfigReader[F] = F

def test[F[_]: Applicative]: ProjectConfigReader[F] =
new ProjectConfigReader[F] {
Expand Down
5 changes: 4 additions & 1 deletion src/main/scala/io/pg/resolver.scala
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,10 @@ trait StateResolver[F[_]] {
}

object StateResolver {
def apply[F[_]](using F: StateResolver[F]): StateResolver[F] = F

def apply[F[_]](
using F: StateResolver[F]
): StateResolver[F] = F

def instance[F[_]: Gitlab: Logger: MonadThrow](
implicit SC: fs2.Compiler[F, F]
Expand Down
6 changes: 1 addition & 5 deletions src/main/scala/io/pg/webhook/webhook.scala
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,7 @@ object WebhookRouter {

object WebhookProcessor {

def instance[
F[
_
]: MergeRequests: ProjectActions: Logger: MonadThrow
]: WebhookEvent => F[Unit] = { ev =>
def instance[F[_]: MergeRequests: ProjectActions: Logger: MonadThrow]: WebhookEvent => F[Unit] = { ev =>
for {
_ <- Logger[F].info("Received event", Map("event" -> ev.toString()))
states <- MergeRequests[F].build(ev.project)
Expand Down
6 changes: 3 additions & 3 deletions src/test/scala/io/pg/fakes/ProjectActionsStateFake.scala
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,9 @@ object ProjectActionsStateFake {
/** This instance has both the capabilities of ProjectActions and StateResolver, because they operate on the same state, and the state is
* sealed by convention.
*/
def instance[
F[_]: Data: Monad: Logger
]: ProjectActions[F] with StateResolver[F] with State.Modifiers[F] = new ProjectActions[F] with StateResolver[F] with State.Modifiers[F] {
def instance[F[_]: Data: Monad: Logger]: ProjectActions[F] with StateResolver[F] with State.Modifiers[F] = new ProjectActions[F]
with StateResolver[F]
with State.Modifiers[F] {

type Action = ProjectAction
def resolve(mr: MergeRequestState): F[Option[ProjectAction]] = ProjectActions.defaultResolve[F](mr)
Expand Down
Loading