From a312860ec74c0e2838106d9a02bb5896de60a253 Mon Sep 17 00:00:00 2001 From: Jolan Rensen Date: Mon, 25 Mar 2024 12:43:22 +0100 Subject: [PATCH] linting fixes --- .../main/kotlin/org/jetbrains/kotlinx/dataframe/io/html.kt | 6 +++--- .../jetbrains/kotlinx/dataframe/util/deprecationMessages.kt | 1 - .../main/kotlin/org/jetbrains/kotlinx/dataframe/io/html.kt | 6 +++--- .../jetbrains/kotlinx/dataframe/util/deprecationMessages.kt | 1 - 4 files changed, 6 insertions(+), 8 deletions(-) diff --git a/core/generated-sources/src/main/kotlin/org/jetbrains/kotlinx/dataframe/io/html.kt b/core/generated-sources/src/main/kotlin/org/jetbrains/kotlinx/dataframe/io/html.kt index 005c46c4de..763c904dcd 100644 --- a/core/generated-sources/src/main/kotlin/org/jetbrains/kotlinx/dataframe/io/html.kt +++ b/core/generated-sources/src/main/kotlin/org/jetbrains/kotlinx/dataframe/io/html.kt @@ -201,7 +201,7 @@ public fun AnyFrame.toStaticHtml( val id = "static_df_${nextTableId()}" // Retrieve all columns, including nested ones - val flattenedCols = getColumnsWithPaths { cols { !it.isColumnGroup() }.recursively() } + val flattenedCols = getColumnsWithPaths { colsAtAnyDepth { !it.isColumnGroup() } } // Get a grid of columns for the header, as well as the side borders for each cell val colGrid = getColumnsHeaderGrid() @@ -389,9 +389,9 @@ private fun AnyFrame.getColumnsHeaderGrid(): List.addChildren(depth: Int = 0, breadth: Int = 0) { var breadth = breadth - val children = children() + val children = cols() val lastIndex = children.lastIndex - for ((i, child) in children().withIndex()) { + for ((i, child) in cols().withIndex()) { matrix[depth][breadth] = matrix[depth][breadth].copy(columnWithPath = child) // draw colGroup side borders unless at start/end of table diff --git a/core/generated-sources/src/main/kotlin/org/jetbrains/kotlinx/dataframe/util/deprecationMessages.kt b/core/generated-sources/src/main/kotlin/org/jetbrains/kotlinx/dataframe/util/deprecationMessages.kt index 75c0f4cad9..86cad56464 100644 --- a/core/generated-sources/src/main/kotlin/org/jetbrains/kotlinx/dataframe/util/deprecationMessages.kt +++ b/core/generated-sources/src/main/kotlin/org/jetbrains/kotlinx/dataframe/util/deprecationMessages.kt @@ -81,7 +81,6 @@ private const val message_0_16 = "Will be removed in 0.16." // endregion - // region keep across releases internal const val IDENTITY_FUNCTION = "This overload is an identity function and can be omitted." diff --git a/core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/io/html.kt b/core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/io/html.kt index 005c46c4de..763c904dcd 100644 --- a/core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/io/html.kt +++ b/core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/io/html.kt @@ -201,7 +201,7 @@ public fun AnyFrame.toStaticHtml( val id = "static_df_${nextTableId()}" // Retrieve all columns, including nested ones - val flattenedCols = getColumnsWithPaths { cols { !it.isColumnGroup() }.recursively() } + val flattenedCols = getColumnsWithPaths { colsAtAnyDepth { !it.isColumnGroup() } } // Get a grid of columns for the header, as well as the side borders for each cell val colGrid = getColumnsHeaderGrid() @@ -389,9 +389,9 @@ private fun AnyFrame.getColumnsHeaderGrid(): List.addChildren(depth: Int = 0, breadth: Int = 0) { var breadth = breadth - val children = children() + val children = cols() val lastIndex = children.lastIndex - for ((i, child) in children().withIndex()) { + for ((i, child) in cols().withIndex()) { matrix[depth][breadth] = matrix[depth][breadth].copy(columnWithPath = child) // draw colGroup side borders unless at start/end of table diff --git a/core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/util/deprecationMessages.kt b/core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/util/deprecationMessages.kt index 75c0f4cad9..86cad56464 100644 --- a/core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/util/deprecationMessages.kt +++ b/core/src/main/kotlin/org/jetbrains/kotlinx/dataframe/util/deprecationMessages.kt @@ -81,7 +81,6 @@ private const val message_0_16 = "Will be removed in 0.16." // endregion - // region keep across releases internal const val IDENTITY_FUNCTION = "This overload is an identity function and can be omitted."