Python: Ignore IterableSequenceNode inconsistencies

This commit is contained in:
Rasmus Wriedt Larsen
2024-03-01 14:22:18 +01:00
parent 7e3e5db3db
commit 7c60562132
2 changed files with 4 additions and 18 deletions

View File

@@ -20,6 +20,10 @@ private module ConsistencyChecksInput implements ConsistencyChecksInputSig {
exists(DataFlow::Node m | m.asCfgNode().getNode() instanceof MatchCapturePattern |
TypeTrackingInput::simpleLocalSmallStep*(m, n)
)
or
// TODO: when adding support for proper content, handle iterable unpacking better
// such as `for k,v in items:`, or `a, (b,c) = ...`
n instanceof DataFlow::IterableSequenceNode
}
}

View File

@@ -1,18 +0,0 @@
unreachableNode
| test.py:215:16:215:19 | IterableSequence | Unreachable node in step of kind simpleLocalSmallStep. |
| test.py:226:17:226:20 | IterableSequence | Unreachable node in step of kind simpleLocalSmallStep. |
| test.py:231:20:231:24 | IterableSequence | Unreachable node in step of kind simpleLocalSmallStep. |
| test.py:580:9:580:12 | IterableSequence | Unreachable node in step of kind simpleLocalSmallStep. |
| test.py:589:5:589:11 | IterableSequence | Unreachable node in step of kind simpleLocalSmallStep. |
| test.py:589:6:589:10 | IterableSequence | Unreachable node in step of kind simpleLocalSmallStep. |
| test.py:589:7:589:9 | IterableSequence | Unreachable node in step of kind simpleLocalSmallStep. |
| test.py:618:7:618:16 | IterableSequence | Unreachable node in step of kind simpleLocalSmallStep. |
| test.py:626:7:626:16 | IterableSequence | Unreachable node in step of kind simpleLocalSmallStep. |
| test.py:634:6:634:17 | IterableSequence | Unreachable node in step of kind simpleLocalSmallStep. |
| test.py:646:6:646:14 | IterableSequence | Unreachable node in step of kind simpleLocalSmallStep. |
| test.py:655:7:655:13 | IterableSequence | Unreachable node in step of kind simpleLocalSmallStep. |
| test.py:664:7:664:13 | IterableSequence | Unreachable node in step of kind simpleLocalSmallStep. |
| test.py:673:6:673:14 | IterableSequence | Unreachable node in step of kind simpleLocalSmallStep. |
| test.py:693:9:693:11 | IterableSequence | Unreachable node in step of kind simpleLocalSmallStep. |
| test.py:701:9:701:12 | IterableSequence | Unreachable node in step of kind simpleLocalSmallStep. |
| test.py:710:9:710:14 | IterableSequence | Unreachable node in step of kind simpleLocalSmallStep. |