Skip to content
This repository was archived by the owner on Jan 19, 2025. It is now read-only.

Commit ef44f49

Browse files
authored
build(deps): bump com.larsreimann:modeling-core to 3.0.0 (#815)
build(deps): bump com.larsreimann:modeling-core to 3.0.0
1 parent 5f1249d commit ef44f49

File tree

4 files changed

+16
-6
lines changed

4 files changed

+16
-6
lines changed

api-editor/backend/build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ dependencies {
4040
implementation("io.ktor:ktor-serialization-kotlinx-json:$ktorVersion")
4141
implementation("io.ktor:ktor-server:$ktorVersion")
4242
implementation("io.ktor:ktor-server-netty:$ktorVersion")
43-
implementation("com.larsreimann:modeling-core:2.0.0")
43+
implementation("com.larsreimann:modeling-core:3.0.0")
4444
implementation("com.larsreimann.safe-ds:safe-ds-core:1.0.0")
4545

4646
// Required, otherwise serializeToFormattedString does not compile

api-editor/backend/src/main/kotlin/com/larsreimann/api_editor/mutable_model/PythonAst.kt

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,9 @@ class PythonCall(
247247
}
248248
}
249249

250-
sealed class PythonLiteral : PythonExpression()
250+
sealed class PythonLiteral : PythonExpression() {
251+
override fun children() = emptySequence<ModelNode>()
252+
}
251253

252254
data class PythonBoolean(val value: Boolean) : PythonLiteral()
253255
data class PythonFloat(val value: Double) : PythonLiteral()
@@ -287,9 +289,13 @@ class PythonPositionalSpread(argument: PythonExpression) : PythonExpression() {
287289

288290
class PythonReference(declaration: PythonDeclaration) : PythonExpression() {
289291
var declaration by CrossReference(declaration)
292+
293+
override fun children() = emptySequence<ModelNode>()
290294
}
291295

292-
data class PythonStringifiedExpression(val string: String) : PythonExpression()
296+
data class PythonStringifiedExpression(val string: String) : PythonExpression() {
297+
override fun children() = emptySequence<ModelNode>()
298+
}
293299

294300
/* ********************************************************************************************************************
295301
* Types
@@ -302,12 +308,16 @@ sealed class PythonType : PythonAstNode() {
302308
class PythonNamedType(declaration: PythonDeclaration?) : PythonType() {
303309
var declaration by CrossReference(declaration)
304310

311+
override fun children() = emptySequence<ModelNode>()
312+
305313
override fun copy(): PythonNamedType {
306314
return PythonNamedType(declaration)
307315
}
308316
}
309317

310318
data class PythonStringifiedType(val string: String) : PythonType() {
319+
override fun children() = emptySequence<ModelNode>()
320+
311321
override fun copy(): PythonStringifiedType {
312322
return PythonStringifiedType(string)
313323
}

api-editor/backend/src/main/kotlin/com/larsreimann/api_editor/transformation/EnumAnnotationProcessor.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ private fun PythonParameter.processEnumAnnotations(module: PythonModule) {
5656
}
5757

5858
// Update argument that references this parameter
59-
val arguments = this.crossReferences()
59+
val arguments = crossReferencesToThis()
6060
.mapNotNull { (it.parent as? PythonReference)?.closest<PythonArgument>() }
6161
.toList()
6262

api-editor/backend/src/main/kotlin/com/larsreimann/api_editor/transformation/ParameterAnnotationProcessor.kt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ private fun PythonParameter.processAttributeAnnotation(annotation: AttributeAnno
6464
)
6565

6666
// Update argument that references this parameter
67-
val arguments = this.crossReferences()
67+
val arguments = crossReferencesToThis()
6868
.mapNotNull { (it.parent as? PythonReference)?.closest<PythonArgument>() }
6969
.toList()
7070

@@ -82,7 +82,7 @@ private fun PythonParameter.processAttributeAnnotation(annotation: AttributeAnno
8282
private fun PythonParameter.processConstantAnnotation(annotation: ConstantAnnotation) {
8383

8484
// Update argument that references this parameter
85-
val arguments = this.crossReferences()
85+
val arguments = crossReferencesToThis()
8686
.mapNotNull { (it.parent as? PythonReference)?.closest<PythonArgument>() }
8787
.toList()
8888

0 commit comments

Comments
 (0)