We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 56dab25 commit b3ba75aCopy full SHA for b3ba75a
python/ql/lib/semmle/python/dataflow/new/internal/DataFlowPrivate.qll
@@ -175,6 +175,19 @@ module EssaFlow {
175
contextManager.strictlyDominates(var)
176
)
177
or
178
+ // Async with var definition
179
+ // `async with f(42) as x:`
180
+ // nodeFrom is `x`, cfg node
181
+ // nodeTo is `x`, essa var
182
+ //
183
+ // This makes the cfg node the local source of the awaited value.
184
+ exists(With with, ControlFlowNode var |
185
+ nodeFrom.(CfgNode).getNode() = var and
186
+ nodeTo.(EssaNode).getVar().getDefinition().(WithDefinition).getDefiningNode() = var and
187
+ with.getOptionalVars() = var.getNode() and
188
+ with.isAsync()
189
+ )
190
+ or
191
// Parameter definition
192
// `def foo(x):`
193
// nodeFrom is `x`, cfgNode
0 commit comments