Skip to content

Commit 60ed847

Browse files
committed
Remove TrailingCommaManagementStrategy change introduce by spotless upgrade
1 parent aeaa671 commit 60ed847

File tree

56 files changed

+979
-1799
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

56 files changed

+979
-1799
lines changed

api/build.gradle.kts

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,7 @@ tasks.register<Copy>("copySubProjectsOpenAPIFiles") {
7171
into("${layout.buildDirectory.get()}/tmp/openapi")
7272
} else {
7373
logger.warn(
74-
"Unable to find OpenAPI definitions in project dependencies => 'copySubProjectsOpenAPIFiles' not configured!"
75-
)
74+
"Unable to find OpenAPI definitions in project dependencies => 'copySubProjectsOpenAPIFiles' not configured!")
7675
}
7776
}
7877

@@ -115,8 +114,7 @@ tasks.register<GenerateTask>("openApiTypescriptGenerate") {
115114
additionalProperties.set(
116115
mapOf(
117116
"npmName" to "@cosmotech/api-ts",
118-
)
119-
)
117+
))
120118
}
121119

122120
tasks.register<Copy>("copyTypescriptGitPushScript") {
@@ -158,8 +156,7 @@ tasks.register<GenerateTask>("openApiPythonGenerate") {
158156
"projectName" to "cosmotech-api",
159157
"packageName" to "cosmotech_api",
160158
"pythonAttrNoneIfUnset" to true,
161-
)
162-
)
159+
))
163160
}
164161

165162
// PROD-14252: temporary fix waiting for upstream resolution of
@@ -266,6 +263,5 @@ tasks.register<GenerateTask>("generateDocumentation") {
266263
"infoEmail" to "platform@cosmotech.com",
267264
"snippetDir" to "${rootDir}/doc/generated-snippets/",
268265
"infoUrl" to "https://github.com/Cosmo-Tech/cosmotech-api",
269-
)
270-
)
266+
))
271267
}

api/src/integrationTest/kotlin/com/cosmotech/api/home/ControllerTestBase.kt

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,7 @@ abstract class ControllerTestBase : AbstractTestcontainersRedisTestBase() {
8080
8181
${response.contentAsString}
8282
"""
83-
.trimIndent()
84-
)
83+
.trimIndent())
8584
}
8685
}
8786
.apply<DefaultMockMvcBuilder>(springSecurity())
@@ -102,8 +101,7 @@ abstract class ControllerTestBase : AbstractTestcontainersRedisTestBase() {
102101
.remove(HttpHeaders.CONTENT_LENGTH)
103102
.remove(HttpHeaders.CACHE_CONTROL),
104103
prettyPrint(),
105-
)
106-
)
104+
))
107105
.build()
108106
}
109107

api/src/integrationTest/kotlin/com/cosmotech/api/home/ControllerTestUtils.kt

Lines changed: 23 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,10 @@ class ControllerTestUtils {
5555
.contentType(MediaType.APPLICATION_JSON)
5656
.content(JSONObject(organizationCreateRequest).toString())
5757
.accept(MediaType.APPLICATION_JSON)
58-
.with(csrf())
59-
)
58+
.with(csrf()))
6059
.andReturn()
6160
.response
62-
.contentAsString
63-
)
61+
.contentAsString)
6462
.getString("id")
6563

6664
@JvmStatic
@@ -87,12 +85,10 @@ class ControllerTestUtils {
8785
.contentType(MediaType.APPLICATION_JSON)
8886
.content(JSONObject(solutionCreateRequest).toString())
8987
.accept(MediaType.APPLICATION_JSON)
90-
.with(csrf())
91-
)
88+
.with(csrf()))
9289
.andReturn()
9390
.response
94-
.contentAsString
95-
)
91+
.contentAsString)
9692
.getString("id")
9793

9894
@JvmStatic
@@ -166,12 +162,10 @@ class ControllerTestUtils {
166162
.contentType(MediaType.APPLICATION_JSON)
167163
.content(JSONObject(runnerCreateRequest).toString())
168164
.accept(MediaType.APPLICATION_JSON)
169-
.with(csrf())
170-
)
165+
.with(csrf()))
171166
.andReturn()
172167
.response
173-
.contentAsString
174-
)
168+
.contentAsString)
175169
.getString("id")
176170

177171
@JvmStatic
@@ -258,17 +252,13 @@ class ControllerTestUtils {
258252
key = workspaceKey,
259253
name = workspaceName,
260254
solutionId = solutionId,
261-
)
262-
)
263-
.toString()
264-
)
255+
))
256+
.toString())
265257
.accept(MediaType.APPLICATION_JSON)
266-
.with(csrf())
267-
)
258+
.with(csrf()))
268259
.andReturn()
269260
.response
270-
.contentAsString
271-
)
261+
.contentAsString)
272262
.getString("id")
273263

274264
@JvmStatic
@@ -284,12 +274,10 @@ class ControllerTestUtils {
284274
.contentType(MediaType.APPLICATION_JSON)
285275
.content(JSONObject(workspaceCreateRequest).toString())
286276
.accept(MediaType.APPLICATION_JSON)
287-
.with(csrf())
288-
)
277+
.with(csrf()))
289278
.andReturn()
290279
.response
291-
.contentAsString
292-
)
280+
.contentAsString)
293281
.getString("id")
294282

295283
@JvmStatic
@@ -367,8 +355,7 @@ class ControllerTestUtils {
367355
val fileToUpload =
368356
this::class.java.getResourceAsStream("/dataset/$TEST_FILE_NAME")
369357
?: throw IllegalStateException(
370-
"$TEST_FILE_NAME file used for endpoints test documentation cannot be null"
371-
)
358+
"$TEST_FILE_NAME file used for endpoints test documentation cannot be null")
372359

373360
val datasetCreateRequestFile =
374361
MockMultipartFile(
@@ -391,12 +378,10 @@ class ControllerTestUtils {
391378
.file(files)
392379
.withPlatformAdminHeader()
393380
.accept(MediaType.APPLICATION_JSON)
394-
.with(csrf())
395-
)
381+
.with(csrf()))
396382
.andReturn()
397383
.response
398-
.contentAsString
399-
)
384+
.contentAsString)
400385
.getString("id")
401386
}
402387

@@ -411,16 +396,13 @@ class ControllerTestUtils {
411396
JSONObject(
412397
mvc.perform(
413398
get(
414-
"/organizations/$organizationId/workspaces/$workspaceId/datasets/$datasetId"
415-
)
399+
"/organizations/$organizationId/workspaces/$workspaceId/datasets/$datasetId")
416400
.withPlatformAdminHeader()
417401
.accept(MediaType.APPLICATION_JSON)
418-
.with(csrf())
419-
)
402+
.with(csrf()))
420403
.andReturn()
421404
.response
422-
.contentAsString
423-
)
405+
.contentAsString)
424406
.getJSONArray("parts")
425407

426408
return Array(parts.length()) { i -> parts.getJSONObject(i).getString("id") }
@@ -438,8 +420,7 @@ class ControllerTestUtils {
438420
val fileToUpload =
439421
this::class.java.getResourceAsStream("/dataset/$TEST_FILE_NAME")
440422
?: throw IllegalStateException(
441-
"$TEST_FILE_NAME file used for endpoints test documentation cannot be null"
442-
)
423+
"$TEST_FILE_NAME file used for endpoints test documentation cannot be null")
443424

444425
val datasetPartCreateRequestFile =
445426
MockMultipartFile(
@@ -458,18 +439,15 @@ class ControllerTestUtils {
458439
return JSONObject(
459440
mvc.perform(
460441
multipart(
461-
"/organizations/$organizationId/workspaces/$workspaceId/datasets/$datasetId/parts"
462-
)
442+
"/organizations/$organizationId/workspaces/$workspaceId/datasets/$datasetId/parts")
463443
.file(datasetPartCreateRequestFile)
464444
.file(file)
465445
.withPlatformAdminHeader()
466446
.accept(MediaType.APPLICATION_JSON)
467-
.with(csrf())
468-
)
447+
.with(csrf()))
469448
.andReturn()
470449
.response
471-
.contentAsString
472-
)
450+
.contentAsString)
473451
.getString("id")
474452
}
475453

@@ -494,8 +472,7 @@ class ControllerTestUtils {
494472
additionalData = mutableMapOf("customClient" to "customDatasetPartData"),
495473
type = type,
496474
sourceName = sourceName,
497-
)
498-
),
475+
)),
499476
security = security,
500477
)
501478
}

0 commit comments

Comments
 (0)