Skip to content

Commit 8049d3f

Browse files
committed
Python: Remove unnecessary 'exists'.
1 parent 69ed7c5 commit 8049d3f

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

python/ql/lib/semmle/python/PrintAst.qll

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,7 @@ private newtype TPrintAstNode =
5252
TStmtListNode(StmtList list) {
5353
shouldPrint(list.getAnItem(), _) and
5454
not list = any(Module mod).getBody() and
55-
not forall(AstNode child | child = list.getAnItem() | isNotNeeded(child)) and
56-
exists(list.getAnItem())
55+
not forall(AstNode child | child = list.getAnItem() | isNotNeeded(child))
5756
} or
5857
TRegExpTermNode(RegExpTerm term) {
5958
exists(StrConst str | term.getRootTerm() = getParsedRegExp(str) and shouldPrint(str, _))

python/ql/lib/semmle/python/dataflow/new/internal/PrintNode.qll

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,6 @@ string prettyNode(DataFlow::Node node) {
5858
*/
5959
bindingset[node]
6060
string prettyNodeForInlineTest(DataFlow::Node node) {
61-
exists(node.asExpr()) and
6261
result = prettyExpr(node.asExpr())
6362
or
6463
exists(Expr e | e = node.(DataFlow::PostUpdateNode).getPreUpdateNode().asExpr() |

0 commit comments

Comments
 (0)