1 parent 78eb8ef commit b78eedaCopy full SHA for b78eeda
1 file changed
python/ql/src/Statements/StatementNoEffect.ql
@@ -95,6 +95,13 @@ private string special_method() {
95
result = any(BinaryExpr b).getOp().getSpecialMethodName()
96
}
97
98
+/*
99
+ * utilities for detection `...` typing ellipsis expression statements
100
+ *
101
+ * Various Python typing constructs merely define class/function signatures.
102
+ * In this case, the body is commonly a single `...` expression statement.
103
+ */
104
+
105
private predicate is_only_scope_statement(Stmt s) {
106
forex(Stmt scope_stmt | scope_stmt = s.getScope().getAStmt() | scope_stmt = s)
107
0 commit comments