From d00c2c938fe944bd5c922a98dcd5ff29b04f45c0 Mon Sep 17 00:00:00 2001
From: "typelevel-steward[bot]"
<106827141+typelevel-steward[bot]@users.noreply.github.com>
Date: Fri, 17 Jan 2025 00:29:25 +0000
Subject: [PATCH 1/3] Update scalafmt-core to 3.8.5
---
.scalafmt.conf | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/.scalafmt.conf b/.scalafmt.conf
index 7b7afb96e..2b315bbac 100644
--- a/.scalafmt.conf
+++ b/.scalafmt.conf
@@ -1,4 +1,4 @@
-version=3.7.17
+version=3.8.5
runner.dialect = Scala213Source3
fileOverride {
"glob:**/scala-3/**" {
From d7c5aaba2ee4ce69866b2415773fc12b0b066ee7 Mon Sep 17 00:00:00 2001
From: "typelevel-steward[bot]"
<106827141+typelevel-steward[bot]@users.noreply.github.com>
Date: Fri, 17 Jan 2025 00:29:40 +0000
Subject: [PATCH 2/3] Reformat with scalafmt 3.8.5
Executed command: scalafmt --non-interactive
---
core/src/main/scala/spire/math/Interval.scala | 3 ---
core/src/main/scala/spire/math/prime/SieveSegment.scala | 3 ++-
.../main/scala/spire/random/rng/MersenneTwister32.scala | 3 ++-
.../main/scala/spire/random/rng/MersenneTwister64.scala | 3 ++-
tests/shared/src/test/scala/spire/math/SortingSuite.scala | 7 ++++---
5 files changed, 10 insertions(+), 9 deletions(-)
diff --git a/core/src/main/scala/spire/math/Interval.scala b/core/src/main/scala/spire/math/Interval.scala
index 3c0c52830..506257021 100644
--- a/core/src/main/scala/spire/math/Interval.scala
+++ b/core/src/main/scala/spire/math/Interval.scala
@@ -890,12 +890,9 @@ object Interval {
* This method assumes that lower < upper to avoid comparisons.
*
* - When one of the arguments is Unbound, the result will be All, Above(x, _), or Below(y, _).
- *
* - When both arguments are Open/Closed (e.g. Open(x), Open(y)), then x < y and the result will be a Bounded
* interval.
- *
* - If both arguments are EmptyBound, the result is Empty.
- *
* - Any other arguments are invalid.
*
* This method cannot construct Point intervals.
diff --git a/core/src/main/scala/spire/math/prime/SieveSegment.scala b/core/src/main/scala/spire/math/prime/SieveSegment.scala
index 4372e2476..2f13109f4 100644
--- a/core/src/main/scala/spire/math/prime/SieveSegment.scala
+++ b/core/src/main/scala/spire/math/prime/SieveSegment.scala
@@ -178,7 +178,8 @@ case class SieveSegment(start: SafeLong, primes: BitSet, cutoff: SafeLong) {
while (k < lim) { k += pp; primes -= k }
m = k.toLong + pp
}
- if (p < 7) {} else if (m - primes.length < primes.length) {
+ if (p < 7) {}
+ else if (m - primes.length < primes.length) {
buf += FastFactor(p, SafeLong(m))
} else if (cutoff > p) {
slowq += Factor(SafeLong(p), SafeLong(m))
diff --git a/core/src/main/scala/spire/random/rng/MersenneTwister32.scala b/core/src/main/scala/spire/random/rng/MersenneTwister32.scala
index 11effa611..cec07654b 100644
--- a/core/src/main/scala/spire/random/rng/MersenneTwister32.scala
+++ b/core/src/main/scala/spire/random/rng/MersenneTwister32.scala
@@ -41,7 +41,8 @@ import java.util.Arrays
* @author
* Dušan Kysel
*/
-final class MersenneTwister32 protected[random] (mt: Array[Int], mti0: Int = 625) extends IntBasedGenerator { // N + 1 == 625
+final class MersenneTwister32 protected[random] (mt: Array[Int], mti0: Int = 625)
+ extends IntBasedGenerator { // N + 1 == 625
import MersenneTwister32.{mag01, BYTES, LowerMask, M, M_1, M_N, N, N_1, N_M, UpperMask}
diff --git a/core/src/main/scala/spire/random/rng/MersenneTwister64.scala b/core/src/main/scala/spire/random/rng/MersenneTwister64.scala
index c1f820a0b..9cf44b4b6 100644
--- a/core/src/main/scala/spire/random/rng/MersenneTwister64.scala
+++ b/core/src/main/scala/spire/random/rng/MersenneTwister64.scala
@@ -41,7 +41,8 @@ import java.util.Arrays
* @author
* Dušan Kysel
*/
-final class MersenneTwister64 protected[random] (mt: Array[Long], mti0: Int = 313) extends LongBasedGenerator { // N + 1 = 313
+final class MersenneTwister64 protected[random] (mt: Array[Long], mti0: Int = 313)
+ extends LongBasedGenerator { // N + 1 = 313
import MersenneTwister64.{mag01, BYTES, LowerMask, M, M_1, M_N, N, N_1, N_M, UpperMask}
diff --git a/tests/shared/src/test/scala/spire/math/SortingSuite.scala b/tests/shared/src/test/scala/spire/math/SortingSuite.scala
index ac56085d2..43ea4962e 100644
--- a/tests/shared/src/test/scala/spire/math/SortingSuite.scala
+++ b/tests/shared/src/test/scala/spire/math/SortingSuite.scala
@@ -175,9 +175,10 @@ class SortingSuite extends munit.FunSuite {
val pivotValue = 7
val expectedAfterPartition = Array(5, 2, 1, 7, 8, 11, 9)
- matchAgainstExpected[Int](QuickSort.partition(_, 2, 9, 5),
- Array(6, -1) ++ leftSegment ++ Array(pivotValue) ++ rightSegment ++ Array(2, 10),
- Array(6, -1) ++ expectedAfterPartition ++ Array(2, 10)
+ matchAgainstExpected[Int](
+ QuickSort.partition(_, 2, 9, 5),
+ Array(6, -1) ++ leftSegment ++ Array(pivotValue) ++ rightSegment ++ Array(2, 10),
+ Array(6, -1) ++ expectedAfterPartition ++ Array(2, 10)
)
}
From 592412adebb2a93f6130d2023efb0bea6d32bfb5 Mon Sep 17 00:00:00 2001
From: "typelevel-steward[bot]"
<106827141+typelevel-steward[bot]@users.noreply.github.com>
Date: Fri, 17 Jan 2025 00:29:40 +0000
Subject: [PATCH 3/3] Add 'Reformat with scalafmt 3.8.5' to
.git-blame-ignore-revs
---
.git-blame-ignore-revs | 3 +++
1 file changed, 3 insertions(+)
diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs
index 6933ae7da..303b0ea18 100644
--- a/.git-blame-ignore-revs
+++ b/.git-blame-ignore-revs
@@ -20,3 +20,6 @@ e93fe9bcf5ff0c314ca676bf9f3b9c8148574786
# Scala Steward: Reformat with scalafmt 3.7.17
7829f68c27c622dee3a8d1329d82a139f183d0c1
+
+# Scala Steward: Reformat with scalafmt 3.8.5
+d7c5aaba2ee4ce69866b2415773fc12b0b066ee7