Python: Allow _some_ PostUpdateNodes

Specifically, allow the ones arising from calls, but not reads or
writes. This should fix the tests.
This commit is contained in:
Taus
2021-04-15 21:26:12 +00:00
committed by GitHub
parent c9c8259ed0
commit 451d36dc97

View File

@@ -27,7 +27,9 @@ class LocalSourceNode extends Node {
LocalSourceNode() {
not comes_from_cfgnode(this) and
not this instanceof ModuleVariableNode and
not this instanceof PostUpdateNode
not this.(PostUpdateNode).getPreUpdateNode() in [
syntheticPostUpdateNode::storePreUpdateNode(), syntheticPostUpdateNode::readPreUpdateNode()
]
or
this = any(ModuleVariableNode mvn).getARead()
}