Skip to content

Commit 4d78762

Browse files
committed
Python: Ignore consistency failure
1 parent 8a7ffac commit 4d78762

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

python/ql/consistency-queries/TypeTrackingConsistency.ql

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,13 @@ private module ConsistencyChecksInput implements ConsistencyChecksInputSig {
3636
// which I couldn't just fix. We ignore the problems here, and instead rely on the
3737
// test-case added in https://github.com/github/codeql/pull/15841
3838
n.getLocation().getFile().getAbsolutePath().matches("%/socketserver.py")
39+
or
40+
// for iterable unpacking like `a,b = some_list`, we currently don't want to allow
41+
// type-tracking... however, in the future when we allow tracking list indexes
42+
// precisely (that is, move away from ListElementContent), we should ensure we have
43+
// proper flow to the synthetic `IterableElementNode`.
44+
exists(DataFlow::ListElementContent c) and
45+
n instanceof DataFlow::IterableElementNode
3946
}
4047
}
4148

python/ql/test/experimental/library-tests/CallGraph/CONSISTENCY/TypeTrackingConsistency.expected

Lines changed: 0 additions & 2 deletions
This file was deleted.

0 commit comments

Comments
 (0)