Skip to content

Commit abfb690

Browse files
committed
Python almost works - except non-local
1 parent 44e85e9 commit abfb690

File tree

1 file changed

+5
-2
lines changed
  • cpg-language-python/src/main/kotlin/de/fraunhofer/aisec/cpg/frontends/python

1 file changed

+5
-2
lines changed

Diff for: cpg-language-python/src/main/kotlin/de/fraunhofer/aisec/cpg/frontends/python/PythonLanguage.kt

+5-2
Original file line numberDiff line numberDiff line change
@@ -241,11 +241,14 @@ class PythonLanguage :
241241
ref,
242242
setAccessValue = false,
243243
)
244-
} else if (ref.astParent is InitializerListExpression) {
244+
} else if (
245+
ref.astParent is InitializerListExpression &&
246+
ref.astParent?.astParent is AssignExpression
247+
) {
245248
handleAssignmentToTarget(
246249
ref.astParent!!.astParent as AssignExpression,
247250
ref,
248-
setAccessValue = false,
251+
setAccessValue = true,
249252
)
250253
} else if (ref.astParent is ForEachStatement) {
251254
val handled = handleWriteToReference(ref)

0 commit comments

Comments
 (0)