Skip to content

Commit 3d08e52

Browse files
Clean up charpred of WithStatement
1 parent 3707f10 commit 3d08e52

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

python/ql/src/Resources/FileNotAlwaysClosedQuery.qll

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -72,9 +72,7 @@ class OsCloseCall extends FileClose {
7272

7373
/** A `with` statement. */
7474
class WithStatement extends FileClose {
75-
With w;
76-
77-
WithStatement() { this.asExpr() = w.getContextExpr() }
75+
WithStatement() { this.asExpr() = any(With w).getContextExpr() }
7876
}
7977

8078
/** Holds if an exception may be raised at `raises` if `file` is a file object. */

0 commit comments

Comments
 (0)