Skip to content

Commit 230c89e

Browse files
authored
Merge pull request #673 from scala-steward/update/scalafmt-core-3.7.5
Update scalafmt-core to 3.7.5
2 parents 57400c2 + 01f9d23 commit 230c89e

File tree

5 files changed

+140
-103
lines changed

5 files changed

+140
-103
lines changed

.git-blame-ignore-revs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,6 @@ fb6cfb8aea15a1b339e3ed69e1e96acd7df4cae6
99

1010
# Scala Steward: Reformat with scalafmt 3.7.1
1111
de9a18b1835f249bedab509b71838f876da9c11e
12+
13+
# Scala Steward: Reformat with scalafmt 3.7.5
14+
44317320a5ef4195fc7dbf6481bcdf466c9dfade

domains-Task/.jvm/src/test/scala/com/thoughtworks/dsl/domains/taskSpec.scala

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,18 @@ final class taskSpec extends AsyncFreeSpec with Matchers {
3434
}
3535
summon[
3636
reified.type <:<
37-
Typed[Suspend[FlatMap[
38-
Pure[n.type],
39-
Match.WithIndex[(0), Pure[(0)]] +:
40-
Match.WithIndex[(1), Pure[(1)]] +:
41-
Match.WithIndex[(2), FlatMap[
42-
Shift[Task.TaskDomain, Int],
43-
FlatMap[Shift[Task.TaskDomain, Int], Pure[Int]]
44-
]] +: Nothing
45-
]], Int]
37+
Typed[
38+
Suspend[FlatMap[
39+
Pure[n.type],
40+
Match.WithIndex[(0), Pure[(0)]] +:
41+
Match.WithIndex[(1), Pure[(1)]] +:
42+
Match.WithIndex[(2), FlatMap[
43+
Shift[Task.TaskDomain, Int],
44+
FlatMap[Shift[Task.TaskDomain, Int], Pure[Int]]
45+
]] +: Nothing
46+
]],
47+
Int
48+
]
4649
]
4750
Task {
4851

domains-scalaz/src/main/scala/com/thoughtworks/dsl/domains/scalaz.scala

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -81,13 +81,13 @@ import scala.util.control.NonFatal
8181
* }}}
8282
* Note that [[Dsl.Keyword#unary_$bang !-notation]] can be used on both
8383
* `trampoline3` and `trampolineSuccess0` even when they are different types,
84-
* i.e. `trampoline3` is a vanilla [[scalaz.Free.Trampoline Trampoline]], while
85-
* `trampolineSuccess0` is a
84+
* i.e. `trampoline3` is a vanilla [[scalaz.Free.Trampoline Trampoline]],
85+
* while `trampolineSuccess0` is a
8686
* [[com.thoughtworks.tryt.invariant.TryT TryT]]-transfomred
8787
* [[scalaz.Free.Trampoline Trampoline]]. It is possible because the
88-
* interpreters of the [[keywords.Monadic]] invoke [[scalaz.MonadTrans.liftM]]
89-
* automatically. <p> The above `dslTryCatch` method is equivalent to the
90-
* following code in [[scalaz.syntax]]:
88+
* interpreters of the [[keywords.Monadic]] invoke
89+
* [[scalaz.MonadTrans.liftM]] automatically. <p> The above `dslTryCatch`
90+
* method is equivalent to the following code in [[scalaz.syntax]]:
9191
* {{{
9292
* import _root_.scalaz.syntax.monad._
9393
* def scalazSyntaxTryCatch: TryTTransfomredTrampoline[String] = {

keywords-Await/src/test/scala/com/thoughtworks/dsl/keywords/AwaitTest.scala

Lines changed: 106 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -338,13 +338,16 @@ class AwaitTest extends AsyncFreeSpec with Matchers with Inside {
338338
}
339339
summon[
340340
reified.type <:<
341-
Typed[Suspend[FlatMap[
342-
Pure[Int],
343-
Match.WithIndex[(0), Pure[LazyList[Nothing]]] +:
344-
Match.WithIndex[(1), FlatMap[Yield[Int], Pure[
345-
LazyList[Int]
346-
]]] +: Nothing
347-
]], LazyList[Int]]
341+
Typed[
342+
Suspend[FlatMap[
343+
Pure[Int],
344+
Match.WithIndex[(0), Pure[LazyList[Nothing]]] +:
345+
Match.WithIndex[(1), FlatMap[Yield[Int], Pure[
346+
LazyList[Int]
347+
]]] +: Nothing
348+
]],
349+
LazyList[Int]
350+
]
348351
]
349352
reified.as[LazyList[Int]]
350353
}
@@ -366,16 +369,19 @@ class AwaitTest extends AsyncFreeSpec with Matchers with Inside {
366369

367370
summon[
368371
reified.type <:<
369-
Typed[Suspend[keywords.TryCatchFinally[
370-
Await[Future[String]],
371-
Match.WithIndex[0, FlatMap[
372-
Await[Future[Int]],
373-
FlatMap[Await[
374-
Future[Int]
375-
], Pure[String]]
376-
]] +: Nothing,
377-
Pure[Unit]
378-
]], String]
372+
Typed[
373+
Suspend[keywords.TryCatchFinally[
374+
Await[Future[String]],
375+
Match.WithIndex[0, FlatMap[
376+
Await[Future[Int]],
377+
FlatMap[Await[
378+
Future[Int]
379+
], Pure[String]]
380+
]] +: Nothing,
381+
Pure[Unit]
382+
]],
383+
String
384+
]
379385
]
380386

381387
val fs = reified.as[Future[String]]
@@ -415,17 +421,23 @@ class AwaitTest extends AsyncFreeSpec with Matchers with Inside {
415421

416422
summon[
417423
reified.type <:<
418-
Typed[Suspend[keywords.TryCatch[FlatMap[
419-
Await[Future[Int]],
420-
FlatMap[Await[
421-
Future[Int]
422-
], Pure[String]]
423-
], Match.WithIndex[0, FlatMap[
424-
Await[Future[Int]],
425-
FlatMap[Await[
426-
Future[Int]
427-
], Pure[String]]
428-
]] +: Nothing]], String]
424+
Typed[
425+
Suspend[keywords.TryCatch[
426+
FlatMap[
427+
Await[Future[Int]],
428+
FlatMap[Await[
429+
Future[Int]
430+
], Pure[String]]
431+
],
432+
Match.WithIndex[0, FlatMap[
433+
Await[Future[Int]],
434+
FlatMap[Await[
435+
Future[Int]
436+
], Pure[String]]
437+
]] +: Nothing
438+
]],
439+
String
440+
]
429441
]
430442
reified.to[Future].map {
431443
_ should be("Cannot divide 3 by 0")
@@ -465,19 +477,22 @@ class AwaitTest extends AsyncFreeSpec with Matchers with Inside {
465477
}
466478
summon[
467479
reified.type <:<
468-
com.thoughtworks.dsl.keywords.Typed[Suspend[
469-
com.thoughtworks.dsl.keywords.FlatMap[
470-
com.thoughtworks.dsl.keywords.Await[scala.concurrent.Future[
471-
A.type
472-
]],
480+
com.thoughtworks.dsl.keywords.Typed[
481+
Suspend[
473482
com.thoughtworks.dsl.keywords.FlatMap[
474483
com.thoughtworks.dsl.keywords.Await[scala.concurrent.Future[
475-
String
484+
A.type
476485
]],
477-
com.thoughtworks.dsl.keywords.Pure[String]
486+
com.thoughtworks.dsl.keywords.FlatMap[
487+
com.thoughtworks.dsl.keywords.Await[scala.concurrent.Future[
488+
String
489+
]],
490+
com.thoughtworks.dsl.keywords.Pure[String]
491+
]
478492
]
479-
]
480-
], String]
493+
],
494+
String
495+
]
481496
]
482497
reified.to[Future].map(_ should be("X"))
483498
}
@@ -490,19 +505,22 @@ class AwaitTest extends AsyncFreeSpec with Matchers with Inside {
490505
}
491506
summon[
492507
reified.type <:<
493-
com.thoughtworks.dsl.keywords.Typed[Suspend[
494-
com.thoughtworks.dsl.keywords.FlatMap[
495-
com.thoughtworks.dsl.keywords.Await[concurrent.Future[
496-
CharSequence
497-
]],
508+
com.thoughtworks.dsl.keywords.Typed[
509+
Suspend[
498510
com.thoughtworks.dsl.keywords.FlatMap[
499-
com.thoughtworks.dsl.keywords.Await[
500-
scala.concurrent.Future[CharSequence]
501-
],
502-
com.thoughtworks.dsl.keywords.Pure[Object]
511+
com.thoughtworks.dsl.keywords.Await[concurrent.Future[
512+
CharSequence
513+
]],
514+
com.thoughtworks.dsl.keywords.FlatMap[
515+
com.thoughtworks.dsl.keywords.Await[
516+
scala.concurrent.Future[CharSequence]
517+
],
518+
com.thoughtworks.dsl.keywords.Pure[Object]
519+
]
503520
]
504-
]
505-
], AnyRef]
521+
],
522+
AnyRef
523+
]
506524
]
507525
reified.to[Future].map(_ should be("x"))
508526
}
@@ -536,16 +554,19 @@ class AwaitTest extends AsyncFreeSpec with Matchers with Inside {
536554
}
537555
summon[
538556
reified.type <:<
539-
com.thoughtworks.dsl.keywords.Typed[Suspend[
540-
com.thoughtworks.dsl.keywords.FlatMap[
541-
com.thoughtworks.dsl.keywords.Await[scala.concurrent.Future[
542-
Int => Int
543-
]],
544-
com.thoughtworks.dsl.keywords.Await[
545-
scala.concurrent.Future[Any => Boolean]
557+
com.thoughtworks.dsl.keywords.Typed[
558+
Suspend[
559+
com.thoughtworks.dsl.keywords.FlatMap[
560+
com.thoughtworks.dsl.keywords.Await[scala.concurrent.Future[
561+
Int => Int
562+
]],
563+
com.thoughtworks.dsl.keywords.Await[
564+
scala.concurrent.Future[Any => Boolean]
565+
]
546566
]
547-
]
548-
], Any => Boolean]
567+
],
568+
Any => Boolean
569+
]
549570
]
550571
reified.to[Future].map {
551572
_ should be(a[Function1[_, _]])
@@ -559,19 +580,22 @@ class AwaitTest extends AsyncFreeSpec with Matchers with Inside {
559580
}
560581
summon[
561582
reified.type <:<
562-
com.thoughtworks.dsl.keywords.Typed[Suspend[
563-
com.thoughtworks.dsl.keywords.FlatMap[
583+
com.thoughtworks.dsl.keywords.Typed[
584+
Suspend[
564585
com.thoughtworks.dsl.keywords.FlatMap[
565-
com.thoughtworks.dsl.keywords.Await[scala.concurrent.Future[
566-
Int => Int
567-
]],
568-
com.thoughtworks.dsl.keywords.Pure[Any => Boolean]
569-
],
570-
com.thoughtworks.dsl.keywords.Await[
571-
scala.concurrent.Future[Any => Boolean]
586+
com.thoughtworks.dsl.keywords.FlatMap[
587+
com.thoughtworks.dsl.keywords.Await[scala.concurrent.Future[
588+
Int => Int
589+
]],
590+
com.thoughtworks.dsl.keywords.Pure[Any => Boolean]
591+
],
592+
com.thoughtworks.dsl.keywords.Await[
593+
scala.concurrent.Future[Any => Boolean]
594+
]
572595
]
573-
]
574-
], Any => Boolean]
596+
],
597+
Any => Boolean
598+
]
575599
]
576600
reified.to[Future].map {
577601
_ should be(a[Function1[_, _]])
@@ -585,19 +609,22 @@ class AwaitTest extends AsyncFreeSpec with Matchers with Inside {
585609
}
586610
summon[
587611
reified.type <:<
588-
com.thoughtworks.dsl.keywords.Typed[Suspend[
589-
com.thoughtworks.dsl.keywords.FlatMap[
612+
com.thoughtworks.dsl.keywords.Typed[
613+
Suspend[
590614
com.thoughtworks.dsl.keywords.FlatMap[
591-
com.thoughtworks.dsl.keywords.Await[scala.concurrent.Future[
592-
Int => Int
593-
]],
594-
com.thoughtworks.dsl.keywords.Pure[Any => Boolean]
595-
],
596-
com.thoughtworks.dsl.keywords.Await[
597-
scala.concurrent.Future[Any => Boolean]
615+
com.thoughtworks.dsl.keywords.FlatMap[
616+
com.thoughtworks.dsl.keywords.Await[scala.concurrent.Future[
617+
Int => Int
618+
]],
619+
com.thoughtworks.dsl.keywords.Pure[Any => Boolean]
620+
],
621+
com.thoughtworks.dsl.keywords.Await[
622+
scala.concurrent.Future[Any => Boolean]
623+
]
598624
]
599-
]
600-
], Any => Boolean]
625+
],
626+
Any => Boolean
627+
]
601628
]
602629
reified.to[Future].map {
603630
_ should be(a[Function1[_, _]])

macros-Reset/src/test/scala/com/thoughtworks/dsl/keywords/ReturnSpec.scala

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -99,18 +99,22 @@ object ReturnSpec extends TestSuite {
9999
}
100100

101101
"summon Dsl.Run" - {
102-
summon[Dsl.Run[com.thoughtworks.dsl.keywords.FlatMap[
103-
com.thoughtworks.dsl.keywords.If[
104-
com.thoughtworks.dsl.keywords.Pure$package.Pure[scala.Boolean],
105-
com.thoughtworks.dsl.keywords.Suspend$package.Suspend[
106-
com.thoughtworks.dsl.keywords.Pure$package.Pure[scala.Double]
102+
summon[Dsl.Run[
103+
com.thoughtworks.dsl.keywords.FlatMap[
104+
com.thoughtworks.dsl.keywords.If[
105+
com.thoughtworks.dsl.keywords.Pure$package.Pure[scala.Boolean],
106+
com.thoughtworks.dsl.keywords.Suspend$package.Suspend[
107+
com.thoughtworks.dsl.keywords.Pure$package.Pure[scala.Double]
108+
],
109+
com.thoughtworks.dsl.keywords.Suspend$package.Suspend[
110+
com.thoughtworks.dsl.keywords.Pure$package.Pure[scala.Double]
111+
]
107112
],
108-
com.thoughtworks.dsl.keywords.Suspend$package.Suspend[
109-
com.thoughtworks.dsl.keywords.Pure$package.Pure[scala.Double]
110-
]
113+
com.thoughtworks.dsl.keywords.Pure$package.Pure[scala.Double]
111114
],
112-
com.thoughtworks.dsl.keywords.Pure$package.Pure[scala.Double]
113-
], Double !! Double, Double]]
115+
Double !! Double,
116+
Double
117+
]]
114118
}
115119
"condition" - {
116120
val continuation = *[[X] =>> AnyRef !! X] {

0 commit comments

Comments
 (0)