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 661ba1c commit b505778Copy full SHA for b505778
python/ql/lib/semmle/python/dataflow/new/internal/DataFlowPrivate.qll
@@ -304,7 +304,9 @@ module LocalFlow {
304
// These are not covered by the `AssignmentDefinition`s in the case above,
305
// as they are not necessarily live.
306
nodeFrom.(CfgNode).getNode() = nodeTo.(CfgNode).getNode().(DefinitionNode).getValue() and
307
- nodeTo.asExpr() = any(VariableCapture::CapturedVariable c).getAStore()
+ nodeTo.asExpr() = any(VariableCapture::CapturedVariable c).getAStore() and
308
+ // Exclude assignments to parameters. These are from default values and not local.
309
+ not nodeTo instanceof ParameterNode
310
or
311
// With definition
312
// `with f(42) as x:`
0 commit comments