We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3707f10 commit 3d08e52Copy full SHA for 3d08e52
1 file changed
python/ql/src/Resources/FileNotAlwaysClosedQuery.qll
@@ -72,9 +72,7 @@ class OsCloseCall extends FileClose {
72
73
/** A `with` statement. */
74
class WithStatement extends FileClose {
75
- With w;
76
-
77
- WithStatement() { this.asExpr() = w.getContextExpr() }
+ WithStatement() { this.asExpr() = any(With w).getContextExpr() }
78
}
79
80
/** Holds if an exception may be raised at `raises` if `file` is a file object. */
0 commit comments