From 456c701e55410e556219d03cf867ca94a8f4da11 Mon Sep 17 00:00:00 2001 From: scala-steward Date: Fri, 17 Nov 2023 00:16:54 +0000 Subject: [PATCH 1/3] Update scalafmt-core to 3.7.17 --- .scalafmt.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.scalafmt.conf b/.scalafmt.conf index 3dbcea50..e1fd888e 100644 --- a/.scalafmt.conf +++ b/.scalafmt.conf @@ -1,3 +1,3 @@ runner.dialect = scala3 -version = 3.7.15 +version = 3.7.17 maxColumn = 120 \ No newline at end of file From cc4f48597d3151542ecec3c159159e1793926314 Mon Sep 17 00:00:00 2001 From: scala-steward Date: Fri, 17 Nov 2023 00:17:00 +0000 Subject: [PATCH 2/3] Reformat with scalafmt 3.7.17 Executed command: scalafmt --non-interactive --- core/src/main/scala/sttp/model/MediaType.scala | 3 ++- core/src/test/scala/sttp/model/MediaTypeTests.scala | 6 +++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/core/src/main/scala/sttp/model/MediaType.scala b/core/src/main/scala/sttp/model/MediaType.scala index 9bdcfcd6..b674ba98 100644 --- a/core/src/main/scala/sttp/model/MediaType.scala +++ b/core/src/main/scala/sttp/model/MediaType.scala @@ -34,7 +34,8 @@ case class MediaType( (range.charset == Wildcard || charset.forall(_.equalsIgnoreCase(range.charset))) && // #309: when the main or sub types are wildcard, not taking into account the parameters // #3253 from tapir: checking the parameters only if they are present in the range - (range.mainType == Wildcard || range.subType == Wildcard || range.otherParameters.isEmpty || (range.otherParameters.size == 1 && range.otherParameters.contains("q")) || { + (range.mainType == Wildcard || range.subType == Wildcard || range.otherParameters.isEmpty || (range.otherParameters.size == 1 && range.otherParameters + .contains("q")) || { // the q value needs to be ignored - it has a different purpose val rangeParametersWithoutQ = range.otherParameters - "q" // `otherParameters` needs to be fully equal to `range.otherParameters` (ignoring case) diff --git a/core/src/test/scala/sttp/model/MediaTypeTests.scala b/core/src/test/scala/sttp/model/MediaTypeTests.scala index ebf6c9ee..df7dfdd0 100644 --- a/core/src/test/scala/sttp/model/MediaTypeTests.scala +++ b/core/src/test/scala/sttp/model/MediaTypeTests.scala @@ -69,7 +69,11 @@ class MediaTypeTests extends AnyFlatSpec with Matchers with TableDrivenPropertyC (MediaType.ApplicationJson, ContentTypeRange("application", "json", "*", EmptyParameters), true), // the q parameter in the range should be ignored (MediaType.ApplicationJson, ContentTypeRange("application", "json", "*", Map("q" -> "0.5")), true), - (MediaType.ApplicationJson.copy(otherParameters = Map("a" -> "1")), ContentTypeRange("application", "json", "*", Map("q" -> "0.5")), true), + ( + MediaType.ApplicationJson.copy(otherParameters = Map("a" -> "1")), + ContentTypeRange("application", "json", "*", Map("q" -> "0.5")), + true + ), // range defines parameters, but they are not equal (ignoring case) (MediaType.ApplicationJson, ContentTypeRange("application", "json", "*", Map("a" -> "1")), false), ( From 27bdeedbad7c5aaaa4e49d4d6332fbf7a7fe2e35 Mon Sep 17 00:00:00 2001 From: scala-steward Date: Fri, 17 Nov 2023 00:17:00 +0000 Subject: [PATCH 3/3] Add 'Reformat with scalafmt 3.7.17' 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 28945314..6a690571 100644 --- a/.git-blame-ignore-revs +++ b/.git-blame-ignore-revs @@ -3,3 +3,6 @@ # Scala Steward: Reformat with scalafmt 3.7.15 f7dccf8d205c1d4f9bd5dbbf9680a6b9d175b444 + +# Scala Steward: Reformat with scalafmt 3.7.17 +cc4f48597d3151542ecec3c159159e1793926314