chore: bump scalafmt to 3.9.7 (#1916)

This commit is contained in:
He-Pin(kerr) 2025-06-24 16:27:14 +08:00 committed by GitHub
parent 21ad8968b1
commit 9577b01b10
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
308 changed files with 689 additions and 688 deletions

View file

@ -34,14 +34,14 @@ import pekko.pattern.ask
class TestActorRef[T <: Actor](_system: ActorSystem, _props: Props, _supervisor: ActorRef, name: String)
extends LocalActorRef({
val disregard = _supervisor match {
case l: LocalActorRef => l.underlying.reserveChild(name)
case l: LocalActorRef => l.underlying.reserveChild(name)
case r: RepointableActorRef =>
r.underlying match {
case _: UnstartedCell =>
throw new IllegalStateException(
"cannot attach a TestActor to an unstarted top-level actor, ensure that it is started by sending a message and observing the reply")
case c: ActorCell => c.reserveChild(name)
case o =>
case o =>
_system.log.error(
"trying to attach child {} to unknown type of supervisor cell {}, this is not going to end well",
name,

View file

@ -564,9 +564,9 @@ class TestEventListener extends Logging.DefaultLogger {
Seq(classOf[Mute], classOf[UnMute], classOf[DeadLetter], classOf[UnhandledMessage], classOf[Dropped])
.foreach(bus.subscribe(context.self, _))
sender() ! LoggerInitialized
case Mute(filters) => filters.foreach(addFilter)
case UnMute(filters) => filters.foreach(removeFilter)
case event: LogEvent => if (!filter(event)) print(event)
case Mute(filters) => filters.foreach(addFilter)
case UnMute(filters) => filters.foreach(removeFilter)
case event: LogEvent => if (!filter(event)) print(event)
case DeadLetter(msg, snd, rcp) =>
if (!msg.isInstanceOf[Terminate]) {
val event = Warning(rcp.path.toString, rcp.getClass, msg)

View file

@ -129,7 +129,7 @@ class TestActor(queue: BlockingDeque[TestActor.Message]) extends Actor {
case Watch(ref) => context.watch(ref)
case UnWatch(ref) => context.unwatch(ref)
case SetAutoPilot(pilot) => autopilot = pilot
case spawn: Spawn =>
case spawn: Spawn =>
val actor = spawn(context)
for (s <- spawn.strategy) supervisorStrategy(actor) = s
queue.offerLast(RealMessage(actor, self))

View file

@ -71,7 +71,7 @@ class TestKit(system: ActorSystem) {
def duration(s: String): FiniteDuration = {
Duration.apply(s) match {
case fd: FiniteDuration => fd
case _ =>
case _ =>
throw new IllegalArgumentException("duration() is only for finite durations, use Duration.Inf() and friends")
}
}

View file

@ -88,7 +88,7 @@ class CoronerSpec extends AnyWordSpec with Matchers {
def recursiveLock(locks: List[ReentrantLock]): Unit = {
locks match {
case Nil => ()
case Nil => ()
case lock :: rest => {
ready.release()
proceed.acquire()

View file

@ -80,9 +80,9 @@ object TestActorRefSpec {
class SenderActor(replyActor: ActorRef) extends TActor {
def receiveT = {
case "complex" => replyActor ! "complexRequest"
case "complex2" => replyActor ! "complexRequest2"
case "simple" => replyActor ! "simpleRequest"
case "complex" => replyActor ! "complexRequest"
case "complex2" => replyActor ! "complexRequest2"
case "simple" => replyActor ! "simpleRequest"
case "complexReply" => {
counter -= 1
}

View file

@ -164,7 +164,7 @@ private[pekko] trait MetricsKit extends MetricsKitOps {
import pekko.util.ccompat.JavaConverters._
registry.getMetrics.asScala.find(_._1 == key).map(_._2) match {
case Some(existing: M) => existing
case Some(_) =>
case Some(_) =>
throw new IllegalArgumentException(
"Key: [%s] is already for different kind of metric! Was [%s], expected [%s]"
.format(key, metric.getClass.getSimpleName, tag.runtimeClass.getSimpleName))