File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
python/ql/lib/semmle/python/dataflow/new/internal Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -299,11 +299,11 @@ module LocalFlow {
299
299
nodeTo .( CfgNode ) .getNode ( ) = def .getDefiningNode ( )
300
300
)
301
301
or
302
- // General definition
303
- // TODO: remove other cases that are now redundant
302
+ // Assignment to captured variables
303
+ // These are not covered by the `AssignmentDefinition`s in the case above,
304
+ // as they are not necessarily live.
304
305
nodeFrom .( CfgNode ) .getNode ( ) = nodeTo .( CfgNode ) .getNode ( ) .( DefinitionNode ) .getValue ( ) and
305
- // remove jump steps (such as assignment of parameter default values)
306
- nodeFrom .getEnclosingCallable ( ) = nodeTo .getEnclosingCallable ( )
306
+ nodeTo .asExpr ( ) = any ( VariableCapture:: CapturedVariable c ) .getAStore ( )
307
307
or
308
308
// With definition
309
309
// `with f(42) as x:`
You can’t perform that action at this time.
0 commit comments