Skip to content

Commit b78eeda

Browse files
minor motivation docs for typing helpers
1 parent 78eb8ef commit b78eeda

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

python/ql/src/Statements/StatementNoEffect.ql

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,13 @@ private string special_method() {
9595
result = any(BinaryExpr b).getOp().getSpecialMethodName()
9696
}
9797

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+
98105
private predicate is_only_scope_statement(Stmt s) {
99106
forex(Stmt scope_stmt | scope_stmt = s.getScope().getAStmt() | scope_stmt = s)
100107
}

0 commit comments

Comments
 (0)