/** * This library file is auto-generated by 'semmle/query_gen.py'. * WARNING: Any modifications to this file will be lost. * Relations can be changed by modifying master.py. */ import python /** INTERNAL: See the class `Add` for further information. */ class Add_ extends @py_Add, Operator { override string toString() { result = "Add" } } /** INTERNAL: See the class `And` for further information. */ class And_ extends @py_And, Boolop { override string toString() { result = "And" } } /** INTERNAL: See the class `AnnAssign` for further information. */ class AnnAssign_ extends @py_AnnAssign, Stmt { /** Gets the value of this annotated assignment. */ Expr getValue() { py_exprs(result, _, this, 1) } /** Gets the annotation of this annotated assignment. */ Expr getAnnotation() { py_exprs(result, _, this, 2) } /** Gets the target of this annotated assignment. */ Expr getTarget() { py_exprs(result, _, this, 3) } override string toString() { result = "AnnAssign" } } /** INTERNAL: See the class `Assert` for further information. */ class Assert_ extends @py_Assert, Stmt { /** Gets the value being tested of this assert statement. */ Expr getTest() { py_exprs(result, _, this, 1) } /** Gets the failure message of this assert statement. */ Expr getMsg() { py_exprs(result, _, this, 2) } override string toString() { result = "Assert" } } /** INTERNAL: See the class `Assign` for further information. */ class Assign_ extends @py_Assign, Stmt { /** Gets the value of this assignment statement. */ Expr getValue() { py_exprs(result, _, this, 1) } /** Gets the targets of this assignment statement. */ ExprList getTargets() { py_expr_lists(result, this, 2) } /** Gets the nth target of this assignment statement. */ Expr getTarget(int index) { result = this.getTargets().getItem(index) } /** Gets a target of this assignment statement. */ Expr getATarget() { result = this.getTargets().getAnItem() } override string toString() { result = "Assign" } } /** INTERNAL: See the class `AssignExpr` for further information. */ class AssignExpr_ extends @py_AssignExpr, Expr { /** Gets the value of this assignment expression. */ Expr getValue() { py_exprs(result, _, this, 2) } /** Gets the target of this assignment expression. */ Expr getTarget() { py_exprs(result, _, this, 3) } override string toString() { result = "AssignExpr" } } /** INTERNAL: See the class `Attribute` for further information. */ class Attribute_ extends @py_Attribute, Expr { /** Gets the object of this attribute expression. */ Expr getValue() { py_exprs(result, _, this, 2) } /** Gets the attribute name of this attribute expression. */ string getAttr() { py_strs(result, this, 3) } /** Gets the context of this attribute expression. */ ExprContext getCtx() { py_expr_contexts(result, _, this) } override string toString() { result = "Attribute" } } /** INTERNAL: See the class `AugAssign` for further information. */ class AugAssign_ extends @py_AugAssign, Stmt { /** Gets the operation of this augmented assignment statement. */ BinaryExpr getOperation() { py_exprs(result, _, this, 1) } override string toString() { result = "AugAssign" } } /** INTERNAL: See the class `AugLoad` for further information. */ class AugLoad_ extends @py_AugLoad, ExprContext { override string toString() { result = "AugLoad" } } /** INTERNAL: See the class `AugStore` for further information. */ class AugStore_ extends @py_AugStore, ExprContext { override string toString() { result = "AugStore" } } /** INTERNAL: See the class `Await` for further information. */ class Await_ extends @py_Await, Expr { /** Gets the expression waited upon of this await expression. */ Expr getValue() { py_exprs(result, _, this, 2) } override string toString() { result = "Await" } } /** INTERNAL: See the class `BinaryExpr` for further information. */ class BinaryExpr_ extends @py_BinaryExpr, Expr { /** Gets the left sub-expression of this binary expression. */ Expr getLeft() { py_exprs(result, _, this, 2) } /** Gets the operator of this binary expression. */ Operator getOp() { py_operators(result, _, this) } /** Gets the right sub-expression of this binary expression. */ Expr getRight() { py_exprs(result, _, this, 4) } override ExprParent getParent() { py_exprs(this, _, result, _) } override string toString() { result = "BinaryExpr" } } /** INTERNAL: See the class `BitAnd` for further information. */ class BitAnd_ extends @py_BitAnd, Operator { override string toString() { result = "BitAnd" } } /** INTERNAL: See the class `BitOr` for further information. */ class BitOr_ extends @py_BitOr, Operator { override string toString() { result = "BitOr" } } /** INTERNAL: See the class `BitXor` for further information. */ class BitXor_ extends @py_BitXor, Operator { override string toString() { result = "BitXor" } } /** INTERNAL: See the class `BoolExpr` for further information. */ class BoolExpr_ extends @py_BoolExpr, Expr { /** Gets the operator of this boolean expression. */ Boolop getOp() { py_boolops(result, _, this) } /** Gets the sub-expressions of this boolean expression. */ ExprList getValues() { py_expr_lists(result, this, 3) } /** Gets the nth sub-expression of this boolean expression. */ Expr getValue(int index) { result = this.getValues().getItem(index) } /** Gets a sub-expression of this boolean expression. */ Expr getAValue() { result = this.getValues().getAnItem() } override string toString() { result = "BoolExpr" } } /** INTERNAL: See the class `Break` for further information. */ class Break_ extends @py_Break, Stmt { override string toString() { result = "Break" } } /** INTERNAL: See the class `Bytes` for further information. */ class Bytes_ extends @py_Bytes, Expr { /** Gets the value of this bytes expression. */ string getS() { py_bytes(result, this, 2) } /** Gets the prefix of this bytes expression. */ string getPrefix() { py_bytes(result, this, 3) } /** Gets the implicitly_concatenated_parts of this bytes expression. */ StringPartList getImplicitlyConcatenatedParts() { py_StringPart_lists(result, this) } /** Gets the nth implicitly_concatenated_part of this bytes expression. */ StringPart getImplicitlyConcatenatedPart(int index) { result = this.getImplicitlyConcatenatedParts().getItem(index) } /** Gets an implicitly_concatenated_part of this bytes expression. */ StringPart getAnImplicitlyConcatenatedPart() { result = this.getImplicitlyConcatenatedParts().getAnItem() } override string toString() { result = "Bytes" } } /** INTERNAL: See the class `BytesOrStr` for further information. */ class BytesOrStr_ extends @py_Bytes_or_Str { /** Gets a textual representation of this element. */ string toString() { result = "BytesOrStr" } } /** INTERNAL: See the class `Call` for further information. */ class Call_ extends @py_Call, Expr { /** Gets the callable of this call expression. */ Expr getFunc() { py_exprs(result, _, this, 2) } /** Gets the positional arguments of this call expression. */ ExprList getPositionalArgs() { py_expr_lists(result, this, 3) } /** Gets the nth positional argument of this call expression. */ Expr getPositionalArg(int index) { result = this.getPositionalArgs().getItem(index) } /** Gets a positional argument of this call expression. */ Expr getAPositionalArg() { result = this.getPositionalArgs().getAnItem() } /** Gets the named arguments of this call expression. */ DictItemList getNamedArgs() { py_dict_item_lists(result, this) } /** Gets the nth named argument of this call expression. */ DictItem getNamedArg(int index) { result = this.getNamedArgs().getItem(index) } /** Gets a named argument of this call expression. */ DictItem getANamedArg() { result = this.getNamedArgs().getAnItem() } override string toString() { result = "Call" } } /** INTERNAL: See the class `Case` for further information. */ class Case_ extends @py_Case, Stmt { /** Gets the pattern of this case statement. */ Pattern getPattern() { py_patterns(result, _, this, 1) } /** Gets the guard of this case statement. */ Expr getGuard() { py_exprs(result, _, this, 2) } /** Gets the body of this case statement. */ StmtList getBody() { py_stmt_lists(result, this, 3) } /** Gets the nth statement of this case statement. */ Stmt getStmt(int index) { result = this.getBody().getItem(index) } /** Gets a statement of this case statement. */ Stmt getAStmt() { result = this.getBody().getAnItem() } override string toString() { result = "Case" } } /** INTERNAL: See the class `Class` for further information. */ class Class_ extends @py_Class { /** Gets the name of this class. */ string getName() { py_strs(result, this, 0) } /** Gets the body of this class. */ StmtList getBody() { py_stmt_lists(result, this, 1) } /** Gets the nth statement of this class. */ Stmt getStmt(int index) { result = this.getBody().getItem(index) } /** Gets a statement of this class. */ Stmt getAStmt() { result = this.getBody().getAnItem() } /** Gets a parent of this class */ ClassExpr getParent() { py_Classes(this, result) } /** Gets a textual representation of this element. */ string toString() { result = "Class" } } /** INTERNAL: See the class `ClassExpr` for further information. */ class ClassExpr_ extends @py_ClassExpr, Expr { /** Gets the name of this class definition. */ string getName() { py_strs(result, this, 2) } /** Gets the bases of this class definition. */ ExprList getBases() { py_expr_lists(result, this, 3) } /** Gets the nth base of this class definition. */ Expr getBase(int index) { result = this.getBases().getItem(index) } /** Gets a base of this class definition. */ Expr getABase() { result = this.getBases().getAnItem() } /** Gets the keyword arguments of this class definition. */ DictItemList getKeywords() { py_dict_item_lists(result, this) } /** Gets the nth keyword argument of this class definition. */ DictItem getKeyword(int index) { result = this.getKeywords().getItem(index) } /** Gets a keyword argument of this class definition. */ DictItem getAKeyword() { result = this.getKeywords().getAnItem() } /** Gets the class scope of this class definition. */ Class getInnerScope() { py_Classes(result, this) } override string toString() { result = "ClassExpr" } } /** INTERNAL: See the class `Compare` for further information. */ class Compare_ extends @py_Compare, Expr { /** Gets the left sub-expression of this compare expression. */ Expr getLeft() { py_exprs(result, _, this, 2) } /** Gets the comparison operators of this compare expression. */ CmpopList getOps() { py_cmpop_lists(result, this) } /** Gets the nth comparison operator of this compare expression. */ Cmpop getOp(int index) { result = this.getOps().getItem(index) } /** Gets a comparison operator of this compare expression. */ Cmpop getAnOp() { result = this.getOps().getAnItem() } /** Gets the right sub-expressions of this compare expression. */ ExprList getComparators() { py_expr_lists(result, this, 4) } /** Gets the nth right sub-expression of this compare expression. */ Expr getComparator(int index) { result = this.getComparators().getItem(index) } /** Gets a right sub-expression of this compare expression. */ Expr getAComparator() { result = this.getComparators().getAnItem() } override string toString() { result = "Compare" } } /** INTERNAL: See the class `Continue` for further information. */ class Continue_ extends @py_Continue, Stmt { override string toString() { result = "Continue" } } /** INTERNAL: See the class `Del` for further information. */ class Del_ extends @py_Del, ExprContext { override string toString() { result = "Del" } } /** INTERNAL: See the class `Delete` for further information. */ class Delete_ extends @py_Delete, Stmt { /** Gets the targets of this delete statement. */ ExprList getTargets() { py_expr_lists(result, this, 1) } /** Gets the nth target of this delete statement. */ Expr getTarget(int index) { result = this.getTargets().getItem(index) } /** Gets a target of this delete statement. */ Expr getATarget() { result = this.getTargets().getAnItem() } override string toString() { result = "Delete" } } /** INTERNAL: See the class `Dict` for further information. */ class Dict_ extends @py_Dict, Expr { /** Gets the items of this dictionary expression. */ DictItemList getItems() { py_dict_item_lists(result, this) } /** Gets the nth item of this dictionary expression. */ DictItem getItem(int index) { result = this.getItems().getItem(index) } /** Gets an item of this dictionary expression. */ DictItem getAnItem() { result = this.getItems().getAnItem() } override string toString() { result = "Dict" } } /** INTERNAL: See the class `DictComp` for further information. */ class DictComp_ extends @py_DictComp, Expr { /** Gets the implementation of this dictionary comprehension. */ Function getFunction() { py_Functions(result, this) } /** Gets the iterable of this dictionary comprehension. */ Expr getIterable() { py_exprs(result, _, this, 3) } override string toString() { result = "DictComp" } } /** INTERNAL: See the class `DictUnpacking` for further information. */ class DictUnpacking_ extends @py_DictUnpacking, DictItem { /** Gets the location of this dictionary unpacking. */ override Location getLocation() { py_locations(result, this) } /** Gets the value of this dictionary unpacking. */ Expr getValue() { py_exprs(result, _, this, 1) } override string toString() { result = "DictUnpacking" } } /** INTERNAL: See the class `Div` for further information. */ class Div_ extends @py_Div, Operator { override string toString() { result = "Div" } } /** INTERNAL: See the class `Ellipsis` for further information. */ class Ellipsis_ extends @py_Ellipsis, Expr { override string toString() { result = "Ellipsis" } } /** INTERNAL: See the class `Eq` for further information. */ class Eq_ extends @py_Eq, Cmpop { override string toString() { result = "Eq" } } /** INTERNAL: See the class `ExceptGroupStmt` for further information. */ class ExceptGroupStmt_ extends @py_ExceptGroupStmt, Stmt { /** Gets the type of this except group block. */ Expr getType() { py_exprs(result, _, this, 1) } /** Gets the name of this except group block. */ Expr getName() { py_exprs(result, _, this, 2) } /** Gets the body of this except group block. */ StmtList getBody() { py_stmt_lists(result, this, 3) } /** Gets the nth statement of this except group block. */ Stmt getStmt(int index) { result = this.getBody().getItem(index) } /** Gets a statement of this except group block. */ Stmt getAStmt() { result = this.getBody().getAnItem() } override string toString() { result = "ExceptGroupStmt" } } /** INTERNAL: See the class `ExceptStmt` for further information. */ class ExceptStmt_ extends @py_ExceptStmt, Stmt { /** Gets the type of this except block. */ Expr getType() { py_exprs(result, _, this, 1) } /** Gets the name of this except block. */ Expr getName() { py_exprs(result, _, this, 2) } /** Gets the body of this except block. */ StmtList getBody() { py_stmt_lists(result, this, 3) } /** Gets the nth statement of this except block. */ Stmt getStmt(int index) { result = this.getBody().getItem(index) } /** Gets a statement of this except block. */ Stmt getAStmt() { result = this.getBody().getAnItem() } override string toString() { result = "ExceptStmt" } } /** INTERNAL: See the class `Exec` for further information. */ class Exec_ extends @py_Exec, Stmt { /** Gets the body of this exec statement. */ Expr getBody() { py_exprs(result, _, this, 1) } /** Gets the globals of this exec statement. */ Expr getGlobals() { py_exprs(result, _, this, 2) } /** Gets the locals of this exec statement. */ Expr getLocals() { py_exprs(result, _, this, 3) } override string toString() { result = "Exec" } } /** INTERNAL: See the class `ExprStmt` for further information. */ class ExprStmt_ extends @py_Expr_stmt, Stmt { /** Gets the value of this expr statement. */ Expr getValue() { py_exprs(result, _, this, 1) } override string toString() { result = "ExprStmt" } } /** INTERNAL: See the class `Filter` for further information. */ class Filter_ extends @py_Filter, Expr { /** Gets the filtered value of this template filter expression. */ Expr getValue() { py_exprs(result, _, this, 2) } /** Gets the filter of this template filter expression. */ Expr getFilter() { py_exprs(result, _, this, 3) } override string toString() { result = "Filter" } } /** INTERNAL: See the class `FloorDiv` for further information. */ class FloorDiv_ extends @py_FloorDiv, Operator { override string toString() { result = "FloorDiv" } } /** INTERNAL: See the class `For` for further information. */ class For_ extends @py_For, Stmt { /** Gets the target of this for statement. */ Expr getTarget() { py_exprs(result, _, this, 1) } /** Gets the iterable of this for statement. */ Expr getIter() { py_exprs(result, _, this, 2) } /** Gets the body of this for statement. */ StmtList getBody() { py_stmt_lists(result, this, 3) } /** Gets the nth statement of this for statement. */ Stmt getStmt(int index) { result = this.getBody().getItem(index) } /** Gets a statement of this for statement. */ Stmt getAStmt() { result = this.getBody().getAnItem() } /** Gets the else block of this for statement. */ StmtList getOrelse() { py_stmt_lists(result, this, 4) } /** Gets the nth else statement of this for statement. */ Stmt getOrelse(int index) { result = this.getOrelse().getItem(index) } /** Gets an else statement of this for statement. */ Stmt getAnOrelse() { result = this.getOrelse().getAnItem() } /** Whether the async property of this for statement is true. */ predicate isAsync() { py_bools(this, 5) } override string toString() { result = "For" } } /** INTERNAL: See the class `FormattedValue` for further information. */ class FormattedValue_ extends @py_FormattedValue, Expr { /** Gets the expression to be formatted of this formatted value. */ Expr getValue() { py_exprs(result, _, this, 2) } /** Gets the type conversion of this formatted value. */ string getConversion() { py_strs(result, this, 3) } /** Gets the format specifier of this formatted value. */ Fstring getFormatSpec() { py_exprs(result, _, this, 4) } override string toString() { result = "FormattedValue" } } /** INTERNAL: See the class `Function` for further information. */ class Function_ extends @py_Function { /** Gets the name of this function. */ string getName() { py_strs(result, this, 0) } /** Gets the positional parameter list of this function. */ ParameterList getArgs() { py_parameter_lists(result, this) } /** Gets the nth positional parameter of this function. */ Parameter getArg(int index) { result = this.getArgs().getItem(index) } /** Gets a positional parameter of this function. */ Parameter getAnArg() { result = this.getArgs().getAnItem() } /** Gets the tuple (*) parameter of this function. */ Expr getVararg() { py_exprs(result, _, this, 2) } /** Gets the keyword-only parameter list of this function. */ ExprList getKwonlyargs() { py_expr_lists(result, this, 3) } /** Gets the nth keyword-only parameter of this function. */ Expr getKwonlyarg(int index) { result = this.getKwonlyargs().getItem(index) } /** Gets a keyword-only parameter of this function. */ Expr getAKwonlyarg() { result = this.getKwonlyargs().getAnItem() } /** Gets the dictionary (**) parameter of this function. */ Expr getKwarg() { py_exprs(result, _, this, 4) } /** Gets the body of this function. */ StmtList getBody() { py_stmt_lists(result, this, 5) } /** Gets the nth statement of this function. */ Stmt getStmt(int index) { result = this.getBody().getItem(index) } /** Gets a statement of this function. */ Stmt getAStmt() { result = this.getBody().getAnItem() } /** Whether the async property of this function is true. */ predicate isAsync() { py_bools(this, 6) } /** Gets a parent of this function */ FunctionParent getParent() { py_Functions(this, result) } /** Gets a textual representation of this element. */ string toString() { result = "Function" } } /** INTERNAL: See the class `FunctionExpr` for further information. */ class FunctionExpr_ extends @py_FunctionExpr, Expr { /** Gets the name of this function definition. */ string getName() { py_strs(result, this, 2) } /** Gets the parameters of this function definition. */ Arguments getArgs() { py_arguments(result, this) } /** Gets the return annotation of this function definition. */ Expr getReturns() { py_exprs(result, _, this, 4) } /** Gets the function scope of this function definition. */ Function getInnerScope() { py_Functions(result, this) } override string toString() { result = "FunctionExpr" } } /** INTERNAL: See the class `FunctionParent` for further information. */ class FunctionParent_ extends @py_Function_parent { /** Gets a textual representation of this element. */ string toString() { result = "FunctionParent" } } /** INTERNAL: See the class `GeneratorExp` for further information. */ class GeneratorExp_ extends @py_GeneratorExp, Expr { /** Gets the implementation of this generator expression. */ Function getFunction() { py_Functions(result, this) } /** Gets the iterable of this generator expression. */ Expr getIterable() { py_exprs(result, _, this, 3) } override string toString() { result = "GeneratorExp" } } /** INTERNAL: See the class `Global` for further information. */ class Global_ extends @py_Global, Stmt { /** Gets the names of this global statement. */ StringList getNames() { py_str_lists(result, this) } /** Gets the nth name of this global statement. */ string getName(int index) { result = this.getNames().getItem(index) } /** Gets a name of this global statement. */ string getAName() { result = this.getNames().getAnItem() } override string toString() { result = "Global" } } /** INTERNAL: See the class `Gt` for further information. */ class Gt_ extends @py_Gt, Cmpop { override string toString() { result = "Gt" } } /** INTERNAL: See the class `GtE` for further information. */ class GtE_ extends @py_GtE, Cmpop { override string toString() { result = "GtE" } } /** INTERNAL: See the class `Guard` for further information. */ class Guard_ extends @py_Guard, Expr { /** Gets the test of this guard expression. */ Expr getTest() { py_exprs(result, _, this, 2) } override string toString() { result = "Guard" } } /** INTERNAL: See the class `If` for further information. */ class If_ extends @py_If, Stmt { /** Gets the test of this if statement. */ Expr getTest() { py_exprs(result, _, this, 1) } /** Gets the if-true block of this if statement. */ StmtList getBody() { py_stmt_lists(result, this, 2) } /** Gets the nth if-true statement of this if statement. */ Stmt getStmt(int index) { result = this.getBody().getItem(index) } /** Gets an if-true statement of this if statement. */ Stmt getAStmt() { result = this.getBody().getAnItem() } /** Gets the if-false block of this if statement. */ StmtList getOrelse() { py_stmt_lists(result, this, 3) } /** Gets the nth if-false statement of this if statement. */ Stmt getOrelse(int index) { result = this.getOrelse().getItem(index) } /** Gets an if-false statement of this if statement. */ Stmt getAnOrelse() { result = this.getOrelse().getAnItem() } override string toString() { result = "If" } } /** INTERNAL: See the class `IfExp` for further information. */ class IfExp_ extends @py_IfExp, Expr { /** Gets the test of this if expression. */ Expr getTest() { py_exprs(result, _, this, 2) } /** Gets the if-true expression of this if expression. */ Expr getBody() { py_exprs(result, _, this, 3) } /** Gets the if-false expression of this if expression. */ Expr getOrelse() { py_exprs(result, _, this, 4) } override string toString() { result = "IfExp" } } /** INTERNAL: See the class `Import` for further information. */ class Import_ extends @py_Import, Stmt { /** Gets the alias list of this import statement. */ AliasList getNames() { py_alias_lists(result, this) } /** Gets the nth alias of this import statement. */ Alias getName(int index) { result = this.getNames().getItem(index) } /** Gets an alias of this import statement. */ Alias getAName() { result = this.getNames().getAnItem() } override string toString() { result = "Import" } } /** INTERNAL: See the class `ImportExpr` for further information. */ class ImportExpr_ extends @py_ImportExpr, Expr { /** Gets the level of this import expression. */ int getLevel() { py_ints(result, this) } /** Gets the name of this import expression. */ string getName() { py_strs(result, this, 3) } /** Whether the top level property of this import expression is true. */ predicate isTop() { py_bools(this, 4) } override string toString() { result = "ImportExpr" } } /** INTERNAL: See the class `ImportStar` for further information. */ class ImportStar_ extends @py_ImportStar, Stmt { /** Gets the module of this import * statement. */ Expr getModule() { py_exprs(result, _, this, 1) } override string toString() { result = "ImportStar" } } /** INTERNAL: See the class `ImportMember` for further information. */ class ImportMember_ extends @py_ImportMember, Expr { /** Gets the module of this from import. */ Expr getModule() { py_exprs(result, _, this, 2) } /** Gets the name of this from import. */ string getName() { py_strs(result, this, 3) } override string toString() { result = "ImportMember" } } /** INTERNAL: See the class `In` for further information. */ class In_ extends @py_In, Cmpop { override string toString() { result = "In" } } /** INTERNAL: See the class `Invert` for further information. */ class Invert_ extends @py_Invert, Unaryop { override string toString() { result = "Invert" } } /** INTERNAL: See the class `Is` for further information. */ class Is_ extends @py_Is, Cmpop { override string toString() { result = "Is" } } /** INTERNAL: See the class `IsNot` for further information. */ class IsNot_ extends @py_IsNot, Cmpop { override string toString() { result = "IsNot" } } /** INTERNAL: See the class `Fstring` for further information. */ class Fstring_ extends @py_Fstring, Expr { /** Gets the values of this formatted string literal. */ ExprList getValues() { py_expr_lists(result, this, 2) } /** Gets the nth value of this formatted string literal. */ Expr getValue(int index) { result = this.getValues().getItem(index) } /** Gets a value of this formatted string literal. */ Expr getAValue() { result = this.getValues().getAnItem() } override ExprParent getParent() { py_exprs(this, _, result, _) } override string toString() { result = "Fstring" } } /** INTERNAL: See the class `KeyValuePair` for further information. */ class KeyValuePair_ extends @py_KeyValuePair, DictItem { /** Gets the location of this key-value pair. */ override Location getLocation() { py_locations(result, this) } /** Gets the value of this key-value pair. */ Expr getValue() { py_exprs(result, _, this, 1) } /** Gets the key of this key-value pair. */ Expr getKey() { py_exprs(result, _, this, 2) } override string toString() { result = "KeyValuePair" } } /** INTERNAL: See the class `LShift` for further information. */ class LShift_ extends @py_LShift, Operator { override string toString() { result = "LShift" } } /** INTERNAL: See the class `Lambda` for further information. */ class Lambda_ extends @py_Lambda, Expr { /** Gets the arguments of this lambda expression. */ Arguments getArgs() { py_arguments(result, this) } /** Gets the function scope of this lambda expression. */ Function getInnerScope() { py_Functions(result, this) } override string toString() { result = "Lambda" } } /** INTERNAL: See the class `List` for further information. */ class List_ extends @py_List, Expr { /** Gets the element list of this list expression. */ ExprList getElts() { py_expr_lists(result, this, 2) } /** Gets the nth element of this list expression. */ Expr getElt(int index) { result = this.getElts().getItem(index) } /** Gets an element of this list expression. */ Expr getAnElt() { result = this.getElts().getAnItem() } /** Gets the context of this list expression. */ ExprContext getCtx() { py_expr_contexts(result, _, this) } override string toString() { result = "List" } } /** INTERNAL: See the class `ListComp` for further information. */ class ListComp_ extends @py_ListComp, Expr { /** Gets the implementation of this list comprehension. */ Function getFunction() { py_Functions(result, this) } /** Gets the iterable of this list comprehension. */ Expr getIterable() { py_exprs(result, _, this, 3) } /** Gets the generators of this list comprehension. */ ComprehensionList getGenerators() { py_comprehension_lists(result, this) } /** Gets the nth generator of this list comprehension. */ Comprehension getGenerator(int index) { result = this.getGenerators().getItem(index) } /** Gets a generator of this list comprehension. */ Comprehension getAGenerator() { result = this.getGenerators().getAnItem() } /** Gets the elements of this list comprehension. */ Expr getElt() { py_exprs(result, _, this, 5) } override string toString() { result = "ListComp" } } /** INTERNAL: See the class `Load` for further information. */ class Load_ extends @py_Load, ExprContext { override string toString() { result = "Load" } } /** INTERNAL: See the class `Lt` for further information. */ class Lt_ extends @py_Lt, Cmpop { override string toString() { result = "Lt" } } /** INTERNAL: See the class `LtE` for further information. */ class LtE_ extends @py_LtE, Cmpop { override string toString() { result = "LtE" } } /** INTERNAL: See the class `MatMult` for further information. */ class MatMult_ extends @py_MatMult, Operator { override string toString() { result = "MatMult" } } /** INTERNAL: See the class `MatchStmt` for further information. */ class MatchStmt_ extends @py_MatchStmt, Stmt { /** Gets the subject of this match statement. */ Expr getSubject() { py_exprs(result, _, this, 1) } /** Gets the cases of this match statement. */ StmtList getCases() { py_stmt_lists(result, this, 2) } /** Gets the nth case of this match statement. */ Stmt getCase(int index) { result = this.getCases().getItem(index) } /** Gets a case of this match statement. */ Stmt getACase() { result = this.getCases().getAnItem() } override string toString() { result = "MatchStmt" } } /** INTERNAL: See the class `MatchAsPattern` for further information. */ class MatchAsPattern_ extends @py_MatchAsPattern, Pattern { /** Gets the pattern of this matchaspattern pattern. */ Pattern getPattern() { py_patterns(result, _, this, 2) } /** Gets the alias of this matchaspattern pattern. */ Expr getAlias() { py_exprs(result, _, this, 3) } override string toString() { result = "MatchAsPattern" } } /** INTERNAL: See the class `MatchCapturePattern` for further information. */ class MatchCapturePattern_ extends @py_MatchCapturePattern, Pattern { /** Gets the variable of this matchcapturepattern pattern. */ Expr getVariable() { py_exprs(result, _, this, 2) } override string toString() { result = "MatchCapturePattern" } } /** INTERNAL: See the class `MatchClassPattern` for further information. */ class MatchClassPattern_ extends @py_MatchClassPattern, Pattern { /** Gets the class of this matchclasspattern pattern. */ Expr getClass() { py_exprs(result, _, this, 2) } /** Gets the class_name of this matchclasspattern pattern. */ Expr getClassName() { py_exprs(result, _, this, 3) } /** Gets the positional of this matchclasspattern pattern. */ PatternList getPositional() { py_pattern_lists(result, this, 4) } /** Gets the nth positional of this matchclasspattern pattern. */ Pattern getPositional(int index) { result = this.getPositional().getItem(index) } /** Gets a positional of this matchclasspattern pattern. */ Pattern getAPositional() { result = this.getPositional().getAnItem() } /** Gets the keyword of this matchclasspattern pattern. */ PatternList getKeyword() { py_pattern_lists(result, this, 5) } /** Gets the nth keyword of this matchclasspattern pattern. */ Pattern getKeyword(int index) { result = this.getKeyword().getItem(index) } /** Gets a keyword of this matchclasspattern pattern. */ Pattern getAKeyword() { result = this.getKeyword().getAnItem() } override string toString() { result = "MatchClassPattern" } } /** INTERNAL: See the class `MatchDoubleStarPattern` for further information. */ class MatchDoubleStarPattern_ extends @py_MatchDoubleStarPattern, Pattern { /** Gets the target of this matchdoublestarpattern pattern. */ Pattern getTarget() { py_patterns(result, _, this, 2) } override string toString() { result = "MatchDoubleStarPattern" } } /** INTERNAL: See the class `MatchKeyValuePattern` for further information. */ class MatchKeyValuePattern_ extends @py_MatchKeyValuePattern, Pattern { /** Gets the key of this matchkeyvaluepattern pattern. */ Pattern getKey() { py_patterns(result, _, this, 2) } /** Gets the value of this matchkeyvaluepattern pattern. */ Pattern getValue() { py_patterns(result, _, this, 3) } override string toString() { result = "MatchKeyValuePattern" } } /** INTERNAL: See the class `MatchKeywordPattern` for further information. */ class MatchKeywordPattern_ extends @py_MatchKeywordPattern, Pattern { /** Gets the attribute of this matchkeywordpattern pattern. */ Expr getAttribute() { py_exprs(result, _, this, 2) } /** Gets the value of this matchkeywordpattern pattern. */ Pattern getValue() { py_patterns(result, _, this, 3) } override string toString() { result = "MatchKeywordPattern" } } /** INTERNAL: See the class `MatchLiteralPattern` for further information. */ class MatchLiteralPattern_ extends @py_MatchLiteralPattern, Pattern { /** Gets the literal of this matchliteralpattern pattern. */ Expr getLiteral() { py_exprs(result, _, this, 2) } override string toString() { result = "MatchLiteralPattern" } } /** INTERNAL: See the class `MatchMappingPattern` for further information. */ class MatchMappingPattern_ extends @py_MatchMappingPattern, Pattern { /** Gets the mappings of this matchmappingpattern pattern. */ PatternList getMappings() { py_pattern_lists(result, this, 2) } /** Gets the nth mapping of this matchmappingpattern pattern. */ Pattern getMapping(int index) { result = this.getMappings().getItem(index) } /** Gets a mapping of this matchmappingpattern pattern. */ Pattern getAMapping() { result = this.getMappings().getAnItem() } override string toString() { result = "MatchMappingPattern" } } /** INTERNAL: See the class `MatchOrPattern` for further information. */ class MatchOrPattern_ extends @py_MatchOrPattern, Pattern { /** Gets the patterns of this matchorpattern pattern. */ PatternList getPatterns() { py_pattern_lists(result, this, 2) } /** Gets the nth pattern of this matchorpattern pattern. */ Pattern getPattern(int index) { result = this.getPatterns().getItem(index) } /** Gets a pattern of this matchorpattern pattern. */ Pattern getAPattern() { result = this.getPatterns().getAnItem() } override string toString() { result = "MatchOrPattern" } } /** INTERNAL: See the class `MatchSequencePattern` for further information. */ class MatchSequencePattern_ extends @py_MatchSequencePattern, Pattern { /** Gets the patterns of this matchsequencepattern pattern. */ PatternList getPatterns() { py_pattern_lists(result, this, 2) } /** Gets the nth pattern of this matchsequencepattern pattern. */ Pattern getPattern(int index) { result = this.getPatterns().getItem(index) } /** Gets a pattern of this matchsequencepattern pattern. */ Pattern getAPattern() { result = this.getPatterns().getAnItem() } override string toString() { result = "MatchSequencePattern" } } /** INTERNAL: See the class `MatchStarPattern` for further information. */ class MatchStarPattern_ extends @py_MatchStarPattern, Pattern { /** Gets the target of this matchstarpattern pattern. */ Pattern getTarget() { py_patterns(result, _, this, 2) } override string toString() { result = "MatchStarPattern" } } /** INTERNAL: See the class `MatchValuePattern` for further information. */ class MatchValuePattern_ extends @py_MatchValuePattern, Pattern { /** Gets the value of this matchvaluepattern pattern. */ Expr getValue() { py_exprs(result, _, this, 2) } override string toString() { result = "MatchValuePattern" } } /** INTERNAL: See the class `MatchWildcardPattern` for further information. */ class MatchWildcardPattern_ extends @py_MatchWildcardPattern, Pattern { override string toString() { result = "MatchWildcardPattern" } } /** INTERNAL: See the class `Mod` for further information. */ class Mod_ extends @py_Mod, Operator { override string toString() { result = "Mod" } } /** INTERNAL: See the class `Module` for further information. */ class Module_ extends @py_Module { /** Gets the name of this module. */ string getName() { py_strs(result, this, 0) } /** Gets the hash (not populated) of this module. */ string getHash() { py_strs(result, this, 1) } /** Gets the body of this module. */ StmtList getBody() { py_stmt_lists(result, this, 2) } /** Gets the nth statement of this module. */ Stmt getStmt(int index) { result = this.getBody().getItem(index) } /** Gets a statement of this module. */ Stmt getAStmt() { result = this.getBody().getAnItem() } /** Gets the kind of this module. */ string getKind() { py_strs(result, this, 3) } /** Gets a textual representation of this element. */ string toString() { result = "Module" } } /** INTERNAL: See the class `Mult` for further information. */ class Mult_ extends @py_Mult, Operator { override string toString() { result = "Mult" } } /** INTERNAL: See the class `Name` for further information. */ class Name_ extends @py_Name, Expr { /** Gets the variable of this name expression. */ Variable getVariable() { py_variables(result, this) } /** Gets the context of this name expression. */ ExprContext getCtx() { py_expr_contexts(result, _, this) } override ExprParent getParent() { py_exprs(this, _, result, _) } override string toString() { result = "Name" } } /** INTERNAL: See the class `Nonlocal` for further information. */ class Nonlocal_ extends @py_Nonlocal, Stmt { /** Gets the names of this nonlocal statement. */ StringList getNames() { py_str_lists(result, this) } /** Gets the nth name of this nonlocal statement. */ string getName(int index) { result = this.getNames().getItem(index) } /** Gets a name of this nonlocal statement. */ string getAName() { result = this.getNames().getAnItem() } override string toString() { result = "Nonlocal" } } /** INTERNAL: See the class `Not` for further information. */ class Not_ extends @py_Not, Unaryop { override string toString() { result = "Not" } } /** INTERNAL: See the class `NotEq` for further information. */ class NotEq_ extends @py_NotEq, Cmpop { override string toString() { result = "NotEq" } } /** INTERNAL: See the class `NotIn` for further information. */ class NotIn_ extends @py_NotIn, Cmpop { override string toString() { result = "NotIn" } } /** INTERNAL: See the class `Num` for further information. */ class Num_ extends @py_Num, Expr { /** Gets the value of this numeric literal. */ string getN() { py_numbers(result, this, 2) } /** Gets the text of this numeric literal. */ string getText() { py_numbers(result, this, 3) } override string toString() { result = "Num" } } /** INTERNAL: See the class `Or` for further information. */ class Or_ extends @py_Or, Boolop { override string toString() { result = "Or" } } /** INTERNAL: See the class `Param` for further information. */ class Param_ extends @py_Param, ExprContext { override string toString() { result = "Param" } } /** INTERNAL: See the class `Pass` for further information. */ class Pass_ extends @py_Pass, Stmt { override string toString() { result = "Pass" } } /** INTERNAL: See the class `PlaceHolder` for further information. */ class PlaceHolder_ extends @py_PlaceHolder, Expr { /** Gets the variable of this template place-holder expression. */ Variable getVariable() { py_variables(result, this) } /** Gets the context of this template place-holder expression. */ ExprContext getCtx() { py_expr_contexts(result, _, this) } override string toString() { result = "PlaceHolder" } } /** INTERNAL: See the class `Pow` for further information. */ class Pow_ extends @py_Pow, Operator { override string toString() { result = "Pow" } } /** INTERNAL: See the class `Print` for further information. */ class Print_ extends @py_Print, Stmt { /** Gets the destination of this print statement. */ Expr getDest() { py_exprs(result, _, this, 1) } /** Gets the values of this print statement. */ ExprList getValues() { py_expr_lists(result, this, 2) } /** Gets the nth value of this print statement. */ Expr getValue(int index) { result = this.getValues().getItem(index) } /** Gets a value of this print statement. */ Expr getAValue() { result = this.getValues().getAnItem() } /** Whether the new line property of this print statement is true. */ predicate isNl() { py_bools(this, 3) } override string toString() { result = "Print" } } /** INTERNAL: See the class `RShift` for further information. */ class RShift_ extends @py_RShift, Operator { override string toString() { result = "RShift" } } /** INTERNAL: See the class `Raise` for further information. */ class Raise_ extends @py_Raise, Stmt { /** Gets the exception of this raise statement. */ Expr getExc() { py_exprs(result, _, this, 1) } /** Gets the cause of this raise statement. */ Expr getCause() { py_exprs(result, _, this, 2) } /** Gets the type of this raise statement. */ Expr getType() { py_exprs(result, _, this, 3) } /** Gets the instance of this raise statement. */ Expr getInst() { py_exprs(result, _, this, 4) } /** Gets the traceback of this raise statement. */ Expr getTback() { py_exprs(result, _, this, 5) } override string toString() { result = "Raise" } } /** INTERNAL: See the class `Repr` for further information. */ class Repr_ extends @py_Repr, Expr { /** Gets the value of this backtick expression. */ Expr getValue() { py_exprs(result, _, this, 2) } override string toString() { result = "Repr" } } /** INTERNAL: See the class `Return` for further information. */ class Return_ extends @py_Return, Stmt { /** Gets the value of this return statement. */ Expr getValue() { py_exprs(result, _, this, 1) } override string toString() { result = "Return" } } /** INTERNAL: See the class `Set` for further information. */ class Set_ extends @py_Set, Expr { /** Gets the elements of this set expression. */ ExprList getElts() { py_expr_lists(result, this, 2) } /** Gets the nth element of this set expression. */ Expr getElt(int index) { result = this.getElts().getItem(index) } /** Gets an element of this set expression. */ Expr getAnElt() { result = this.getElts().getAnItem() } override string toString() { result = "Set" } } /** INTERNAL: See the class `SetComp` for further information. */ class SetComp_ extends @py_SetComp, Expr { /** Gets the implementation of this set comprehension. */ Function getFunction() { py_Functions(result, this) } /** Gets the iterable of this set comprehension. */ Expr getIterable() { py_exprs(result, _, this, 3) } override string toString() { result = "SetComp" } } /** INTERNAL: See the class `Slice` for further information. */ class Slice_ extends @py_Slice, Expr { /** Gets the start of this slice. */ Expr getStart() { py_exprs(result, _, this, 2) } /** Gets the stop of this slice. */ Expr getStop() { py_exprs(result, _, this, 3) } /** Gets the step of this slice. */ Expr getStep() { py_exprs(result, _, this, 4) } override string toString() { result = "Slice" } } /** INTERNAL: See the class `SpecialOperation` for further information. */ class SpecialOperation_ extends @py_SpecialOperation, Expr { /** Gets the name of this special operation. */ string getName() { py_strs(result, this, 2) } /** Gets the arguments of this special operation. */ ExprList getArguments() { py_expr_lists(result, this, 3) } /** Gets the nth argument of this special operation. */ Expr getArgument(int index) { result = this.getArguments().getItem(index) } /** Gets an argument of this special operation. */ Expr getAnArgument() { result = this.getArguments().getAnItem() } override string toString() { result = "SpecialOperation" } } /** INTERNAL: See the class `Starred` for further information. */ class Starred_ extends @py_Starred, Expr { /** Gets the value of this starred expression. */ Expr getValue() { py_exprs(result, _, this, 2) } /** Gets the context of this starred expression. */ ExprContext getCtx() { py_expr_contexts(result, _, this) } override string toString() { result = "Starred" } } /** INTERNAL: See the class `Store` for further information. */ class Store_ extends @py_Store, ExprContext { override string toString() { result = "Store" } } /** INTERNAL: See the class `Str` for further information. */ class Str_ extends @py_Str, Expr { /** Gets the text of this string literal. */ string getS() { py_strs(result, this, 2) } /** Gets the prefix of this string literal. */ string getPrefix() { py_strs(result, this, 3) } /** Gets the implicitly_concatenated_parts of this string literal. */ StringPartList getImplicitlyConcatenatedParts() { py_StringPart_lists(result, this) } /** Gets the nth implicitly_concatenated_part of this string literal. */ StringPart getImplicitlyConcatenatedPart(int index) { result = this.getImplicitlyConcatenatedParts().getItem(index) } /** Gets an implicitly_concatenated_part of this string literal. */ StringPart getAnImplicitlyConcatenatedPart() { result = this.getImplicitlyConcatenatedParts().getAnItem() } override string toString() { result = "Str" } } /** INTERNAL: See the class `StringPart` for further information. */ class StringPart_ extends @py_StringPart { /** Gets the text of this implicitly concatenated part. */ string getText() { py_strs(result, this, 0) } /** Gets the location of this implicitly concatenated part. */ Location getLocation() { py_locations(result, this) } /** Gets a parent of this implicitly concatenated part */ StringPartList getParent() { py_StringParts(this, result, _) } /** Gets a textual representation of this element. */ string toString() { result = "StringPart" } } /** INTERNAL: See the class `StringPartList` for further information. */ class StringPartList_ extends @py_StringPart_list { /** Gets a parent of this implicitly concatenated part list */ BytesOrStr getParent() { py_StringPart_lists(this, result) } /** Gets an item of this implicitly concatenated part list */ StringPart getAnItem() { py_StringParts(result, this, _) } /** Gets the nth item of this implicitly concatenated part list */ StringPart getItem(int index) { py_StringParts(result, this, index) } /** Gets a textual representation of this element. */ string toString() { result = "StringPartList" } } /** INTERNAL: See the class `Sub` for further information. */ class Sub_ extends @py_Sub, Operator { override string toString() { result = "Sub" } } /** INTERNAL: See the class `Subscript` for further information. */ class Subscript_ extends @py_Subscript, Expr { /** Gets the value of this subscript expression. */ Expr getValue() { py_exprs(result, _, this, 2) } /** Gets the index of this subscript expression. */ Expr getIndex() { py_exprs(result, _, this, 3) } /** Gets the context of this subscript expression. */ ExprContext getCtx() { py_expr_contexts(result, _, this) } override string toString() { result = "Subscript" } } /** INTERNAL: See the class `TemplateDottedNotation` for further information. */ class TemplateDottedNotation_ extends @py_TemplateDottedNotation, Expr { /** Gets the object of this template dotted notation expression. */ Expr getValue() { py_exprs(result, _, this, 2) } /** Gets the attribute name of this template dotted notation expression. */ string getAttr() { py_strs(result, this, 3) } /** Gets the context of this template dotted notation expression. */ ExprContext getCtx() { py_expr_contexts(result, _, this) } override string toString() { result = "TemplateDottedNotation" } } /** INTERNAL: See the class `TemplateWrite` for further information. */ class TemplateWrite_ extends @py_TemplateWrite, Stmt { /** Gets the value of this template write statement. */ Expr getValue() { py_exprs(result, _, this, 1) } override string toString() { result = "TemplateWrite" } } /** INTERNAL: See the class `Try` for further information. */ class Try_ extends @py_Try, Stmt { /** Gets the body of this try statement. */ StmtList getBody() { py_stmt_lists(result, this, 1) } /** Gets the nth statement of this try statement. */ Stmt getStmt(int index) { result = this.getBody().getItem(index) } /** Gets a statement of this try statement. */ Stmt getAStmt() { result = this.getBody().getAnItem() } /** Gets the else block of this try statement. */ StmtList getOrelse() { py_stmt_lists(result, this, 2) } /** Gets the nth else statement of this try statement. */ Stmt getOrelse(int index) { result = this.getOrelse().getItem(index) } /** Gets an else statement of this try statement. */ Stmt getAnOrelse() { result = this.getOrelse().getAnItem() } /** Gets the exception handlers of this try statement. */ StmtList getHandlers() { py_stmt_lists(result, this, 3) } /** Gets the nth exception handler of this try statement. */ Stmt getHandler(int index) { result = this.getHandlers().getItem(index) } /** Gets an exception handler of this try statement. */ Stmt getAHandler() { result = this.getHandlers().getAnItem() } /** Gets the finally block of this try statement. */ StmtList getFinalbody() { py_stmt_lists(result, this, 4) } /** Gets the nth finally statement of this try statement. */ Stmt getFinalstmt(int index) { result = this.getFinalbody().getItem(index) } /** Gets a finally statement of this try statement. */ Stmt getAFinalstmt() { result = this.getFinalbody().getAnItem() } override string toString() { result = "Try" } } /** INTERNAL: See the class `Tuple` for further information. */ class Tuple_ extends @py_Tuple, Expr { /** Gets the elements of this tuple expression. */ ExprList getElts() { py_expr_lists(result, this, 2) } /** Gets the nth element of this tuple expression. */ Expr getElt(int index) { result = this.getElts().getItem(index) } /** Gets an element of this tuple expression. */ Expr getAnElt() { result = this.getElts().getAnItem() } /** Gets the context of this tuple expression. */ ExprContext getCtx() { py_expr_contexts(result, _, this) } override ExprParent getParent() { py_exprs(this, _, result, _) } override string toString() { result = "Tuple" } } /** INTERNAL: See the class `UAdd` for further information. */ class UAdd_ extends @py_UAdd, Unaryop { override string toString() { result = "UAdd" } } /** INTERNAL: See the class `USub` for further information. */ class USub_ extends @py_USub, Unaryop { override string toString() { result = "USub" } } /** INTERNAL: See the class `UnaryExpr` for further information. */ class UnaryExpr_ extends @py_UnaryExpr, Expr { /** Gets the operator of this unary expression. */ Unaryop getOp() { py_unaryops(result, _, this) } /** Gets the operand of this unary expression. */ Expr getOperand() { py_exprs(result, _, this, 3) } override string toString() { result = "UnaryExpr" } } /** INTERNAL: See the class `While` for further information. */ class While_ extends @py_While, Stmt { /** Gets the test of this while statement. */ Expr getTest() { py_exprs(result, _, this, 1) } /** Gets the body of this while statement. */ StmtList getBody() { py_stmt_lists(result, this, 2) } /** Gets the nth statement of this while statement. */ Stmt getStmt(int index) { result = this.getBody().getItem(index) } /** Gets a statement of this while statement. */ Stmt getAStmt() { result = this.getBody().getAnItem() } /** Gets the else block of this while statement. */ StmtList getOrelse() { py_stmt_lists(result, this, 3) } /** Gets the nth else statement of this while statement. */ Stmt getOrelse(int index) { result = this.getOrelse().getItem(index) } /** Gets an else statement of this while statement. */ Stmt getAnOrelse() { result = this.getOrelse().getAnItem() } override string toString() { result = "While" } } /** INTERNAL: See the class `With` for further information. */ class With_ extends @py_With, Stmt { /** Gets the context manager of this with statement. */ Expr getContextExpr() { py_exprs(result, _, this, 1) } /** Gets the optional variable of this with statement. */ Expr getOptionalVars() { py_exprs(result, _, this, 2) } /** Gets the body of this with statement. */ StmtList getBody() { py_stmt_lists(result, this, 3) } /** Gets the nth statement of this with statement. */ Stmt getStmt(int index) { result = this.getBody().getItem(index) } /** Gets a statement of this with statement. */ Stmt getAStmt() { result = this.getBody().getAnItem() } /** Whether the async property of this with statement is true. */ predicate isAsync() { py_bools(this, 4) } override string toString() { result = "With" } } /** INTERNAL: See the class `Yield` for further information. */ class Yield_ extends @py_Yield, Expr { /** Gets the value of this yield expression. */ Expr getValue() { py_exprs(result, _, this, 2) } override string toString() { result = "Yield" } } /** INTERNAL: See the class `YieldFrom` for further information. */ class YieldFrom_ extends @py_YieldFrom, Expr { /** Gets the value of this yield-from expression. */ Expr getValue() { py_exprs(result, _, this, 2) } override string toString() { result = "YieldFrom" } } /** INTERNAL: See the class `Alias` for further information. */ class Alias_ extends @py_alias { /** Gets the value of this alias. */ Expr getValue() { py_exprs(result, _, this, 0) } /** Gets the name of this alias. */ Expr getAsname() { py_exprs(result, _, this, 1) } /** Gets a parent of this alias */ AliasList getParent() { py_aliases(this, result, _) } /** Gets a textual representation of this element. */ string toString() { result = "Alias" } } /** INTERNAL: See the class `AliasList` for further information. */ class AliasList_ extends @py_alias_list { /** Gets a parent of this alias list */ Import getParent() { py_alias_lists(this, result) } /** Gets an item of this alias list */ Alias getAnItem() { py_aliases(result, this, _) } /** Gets the nth item of this alias list */ Alias getItem(int index) { py_aliases(result, this, index) } /** Gets a textual representation of this element. */ string toString() { result = "AliasList" } } /** INTERNAL: See the class `Arguments` for further information. */ class Arguments_ extends @py_arguments { /** Gets the keyword-only default values of this parameters definition. */ ExprList getKwDefaults() { py_expr_lists(result, this, 0) } /** Gets the nth keyword-only default value of this parameters definition. */ Expr getKwDefault(int index) { result = this.getKwDefaults().getItem(index) } /** Gets a keyword-only default value of this parameters definition. */ Expr getAKwDefault() { result = this.getKwDefaults().getAnItem() } /** Gets the default values of this parameters definition. */ ExprList getDefaults() { py_expr_lists(result, this, 1) } /** Gets the nth default value of this parameters definition. */ Expr getDefault(int index) { result = this.getDefaults().getItem(index) } /** Gets a default value of this parameters definition. */ Expr getADefault() { result = this.getDefaults().getAnItem() } /** Gets the annotations of this parameters definition. */ ExprList getAnnotations() { py_expr_lists(result, this, 2) } /** Gets the nth annotation of this parameters definition. */ Expr getAnnotation(int index) { result = this.getAnnotations().getItem(index) } /** Gets an annotation of this parameters definition. */ Expr getAnAnnotation() { result = this.getAnnotations().getAnItem() } /** Gets the *arg annotation of this parameters definition. */ Expr getVarargannotation() { py_exprs(result, _, this, 3) } /** Gets the **kwarg annotation of this parameters definition. */ Expr getKwargannotation() { py_exprs(result, _, this, 4) } /** Gets the keyword-only annotations of this parameters definition. */ ExprList getKwAnnotations() { py_expr_lists(result, this, 5) } /** Gets the nth keyword-only annotation of this parameters definition. */ Expr getKwAnnotation(int index) { result = this.getKwAnnotations().getItem(index) } /** Gets a keyword-only annotation of this parameters definition. */ Expr getAKwAnnotation() { result = this.getKwAnnotations().getAnItem() } /** Gets a parent of this parameters definition */ ArgumentsParent getParent() { py_arguments(this, result) } /** Gets a textual representation of this element. */ string toString() { result = "Arguments" } } /** INTERNAL: See the class `ArgumentsParent` for further information. */ class ArgumentsParent_ extends @py_arguments_parent { /** Gets a textual representation of this element. */ string toString() { result = "ArgumentsParent" } } /** INTERNAL: See the class `AstNode` for further information. */ class AstNode_ extends @py_ast_node { /** Gets a textual representation of this element. */ string toString() { result = "AstNode" } } /** INTERNAL: See the class `BoolParent` for further information. */ class BoolParent_ extends @py_bool_parent { /** Gets a textual representation of this element. */ string toString() { result = "BoolParent" } } /** INTERNAL: See the class `Boolop` for further information. */ class Boolop_ extends @py_boolop { /** Gets a parent of this boolean operator */ BoolExpr getParent() { py_boolops(this, _, result) } /** Gets a textual representation of this element. */ string toString() { result = "Boolop" } } /** INTERNAL: See the class `Cmpop` for further information. */ class Cmpop_ extends @py_cmpop { /** Gets a parent of this comparison operator */ CmpopList getParent() { py_cmpops(this, _, result, _) } /** Gets a textual representation of this element. */ string toString() { result = "Cmpop" } } /** INTERNAL: See the class `CmpopList` for further information. */ class CmpopList_ extends @py_cmpop_list { /** Gets a parent of this comparison operator list */ Compare getParent() { py_cmpop_lists(this, result) } /** Gets an item of this comparison operator list */ Cmpop getAnItem() { py_cmpops(result, _, this, _) } /** Gets the nth item of this comparison operator list */ Cmpop getItem(int index) { py_cmpops(result, _, this, index) } /** Gets a textual representation of this element. */ string toString() { result = "CmpopList" } } /** INTERNAL: See the class `Comprehension` for further information. */ class Comprehension_ extends @py_comprehension { /** Gets the location of this comprehension. */ Location getLocation() { py_locations(result, this) } /** Gets the iterable of this comprehension. */ Expr getIter() { py_exprs(result, _, this, 1) } /** Gets the target of this comprehension. */ Expr getTarget() { py_exprs(result, _, this, 2) } /** Gets the conditions of this comprehension. */ ExprList getIfs() { py_expr_lists(result, this, 3) } /** Gets the nth condition of this comprehension. */ Expr getIf(int index) { result = this.getIfs().getItem(index) } /** Gets a condition of this comprehension. */ Expr getAnIf() { result = this.getIfs().getAnItem() } /** Gets a parent of this comprehension */ ComprehensionList getParent() { py_comprehensions(this, result, _) } /** Gets a textual representation of this element. */ string toString() { result = "Comprehension" } } /** INTERNAL: See the class `ComprehensionList` for further information. */ class ComprehensionList_ extends @py_comprehension_list { /** Gets a parent of this comprehension list */ ListComp getParent() { py_comprehension_lists(this, result) } /** Gets an item of this comprehension list */ Comprehension getAnItem() { py_comprehensions(result, this, _) } /** Gets the nth item of this comprehension list */ Comprehension getItem(int index) { py_comprehensions(result, this, index) } /** Gets a textual representation of this element. */ string toString() { result = "ComprehensionList" } } /** INTERNAL: See the class `DictItem` for further information. */ class DictItem_ extends @py_dict_item { /** Gets a parent of this dict_item */ DictItemList getParent() { py_dict_items(this, _, result, _) } /** Gets a textual representation of this element. */ string toString() { result = "DictItem" } } /** INTERNAL: See the class `DictItemList` for further information. */ class DictItemList_ extends @py_dict_item_list { /** Gets a parent of this dict_item list */ DictItemListParent getParent() { py_dict_item_lists(this, result) } /** Gets an item of this dict_item list */ DictItem getAnItem() { py_dict_items(result, _, this, _) } /** Gets the nth item of this dict_item list */ DictItem getItem(int index) { py_dict_items(result, _, this, index) } /** Gets a textual representation of this element. */ string toString() { result = "DictItemList" } } /** INTERNAL: See the class `DictItemListParent` for further information. */ class DictItemListParent_ extends @py_dict_item_list_parent { /** Gets a textual representation of this element. */ string toString() { result = "DictItemListParent" } } /** INTERNAL: See the class `Expr` for further information. */ class Expr_ extends @py_expr { /** Gets the location of this expression. */ Location getLocation() { py_locations(result, this) } /** Whether the parenthesised property of this expression is true. */ predicate isParenthesised() { py_bools(this, 1) } /** Gets a parent of this expression */ ExprParent getParent() { py_exprs(this, _, result, _) } /** Gets a textual representation of this element. */ string toString() { result = "Expr" } } /** INTERNAL: See the class `ExprContext` for further information. */ class ExprContext_ extends @py_expr_context { /** Gets a parent of this expression context */ ExprContextParent getParent() { py_expr_contexts(this, _, result) } /** Gets a textual representation of this element. */ string toString() { result = "ExprContext" } } /** INTERNAL: See the class `ExprContextParent` for further information. */ class ExprContextParent_ extends @py_expr_context_parent { /** Gets a textual representation of this element. */ string toString() { result = "ExprContextParent" } } /** INTERNAL: See the class `ExprList` for further information. */ class ExprList_ extends @py_expr_list { /** Gets a parent of this expression list */ ExprListParent getParent() { py_expr_lists(this, result, _) } /** Gets an item of this expression list */ Expr getAnItem() { py_exprs(result, _, this, _) } /** Gets the nth item of this expression list */ Expr getItem(int index) { py_exprs(result, _, this, index) } /** Gets a textual representation of this element. */ string toString() { result = "ExprList" } } /** INTERNAL: See the class `ExprListParent` for further information. */ class ExprListParent_ extends @py_expr_list_parent { /** Gets a textual representation of this element. */ string toString() { result = "ExprListParent" } } /** INTERNAL: See the class `ExprOrStmt` for further information. */ class ExprOrStmt_ extends @py_expr_or_stmt { /** Gets a textual representation of this element. */ string toString() { result = "ExprOrStmt" } } /** INTERNAL: See the class `ExprParent` for further information. */ class ExprParent_ extends @py_expr_parent { /** Gets a textual representation of this element. */ string toString() { result = "ExprParent" } } /** INTERNAL: See the class `Keyword` for further information. */ class Keyword_ extends @py_keyword, DictItem { /** Gets the location of this keyword argument. */ override Location getLocation() { py_locations(result, this) } /** Gets the value of this keyword argument. */ Expr getValue() { py_exprs(result, _, this, 1) } /** Gets the arg of this keyword argument. */ string getArg() { py_strs(result, this, 2) } override string toString() { result = "Keyword" } } /** INTERNAL: See the class `LocationParent` for further information. */ class LocationParent_ extends @py_location_parent { /** Gets a textual representation of this element. */ string toString() { result = "LocationParent" } } /** INTERNAL: See the class `Operator` for further information. */ class Operator_ extends @py_operator { /** Gets a parent of this operator */ BinaryExpr getParent() { py_operators(this, _, result) } /** Gets a textual representation of this element. */ string toString() { result = "Operator" } } /** INTERNAL: See the class `Parameter` for further information. */ class Parameter_ extends @py_parameter { /** Gets a textual representation of this element. */ string toString() { result = "Parameter" } } /** INTERNAL: See the class `Pattern` for further information. */ class Pattern_ extends @py_pattern { /** Gets the location of this pattern. */ Location getLocation() { py_locations(result, this) } /** Whether the parenthesised property of this pattern is true. */ predicate isParenthesised() { py_bools(this, 1) } /** Gets a parent of this pattern */ PatternParent getParent() { py_patterns(this, _, result, _) } /** Gets a textual representation of this element. */ string toString() { result = "Pattern" } } /** INTERNAL: See the class `PatternList` for further information. */ class PatternList_ extends @py_pattern_list { /** Gets a parent of this pattern list */ PatternListParent getParent() { py_pattern_lists(this, result, _) } /** Gets an item of this pattern list */ Pattern getAnItem() { py_patterns(result, _, this, _) } /** Gets the nth item of this pattern list */ Pattern getItem(int index) { py_patterns(result, _, this, index) } /** Gets a textual representation of this element. */ string toString() { result = "PatternList" } } /** INTERNAL: See the class `PatternListParent` for further information. */ class PatternListParent_ extends @py_pattern_list_parent { /** Gets a textual representation of this element. */ string toString() { result = "PatternListParent" } } /** INTERNAL: See the class `PatternParent` for further information. */ class PatternParent_ extends @py_pattern_parent { /** Gets a textual representation of this element. */ string toString() { result = "PatternParent" } } /** INTERNAL: See the class `Scope` for further information. */ class Scope_ extends @py_scope { /** Gets a textual representation of this element. */ string toString() { result = "Scope" } } /** INTERNAL: See the class `Stmt` for further information. */ class Stmt_ extends @py_stmt { /** Gets the location of this statement. */ Location getLocation() { py_locations(result, this) } /** Gets a parent of this statement */ StmtList getParent() { py_stmts(this, _, result, _) } /** Gets a textual representation of this element. */ string toString() { result = "Stmt" } } /** INTERNAL: See the class `StmtList` for further information. */ class StmtList_ extends @py_stmt_list { /** Gets a parent of this statement list */ StmtListParent getParent() { py_stmt_lists(this, result, _) } /** Gets an item of this statement list */ Stmt getAnItem() { py_stmts(result, _, this, _) } /** Gets the nth item of this statement list */ Stmt getItem(int index) { py_stmts(result, _, this, index) } /** Gets a textual representation of this element. */ string toString() { result = "StmtList" } } /** INTERNAL: See the class `StmtListParent` for further information. */ class StmtListParent_ extends @py_stmt_list_parent { /** Gets a textual representation of this element. */ string toString() { result = "StmtListParent" } } /** INTERNAL: See the class `StringList` for further information. */ class StringList_ extends @py_str_list { /** Gets a parent of this string list */ StrListParent getParent() { py_str_lists(this, result) } /** Gets an item of this string list */ string getAnItem() { py_strs(result, this, _) } /** Gets the nth item of this string list */ string getItem(int index) { py_strs(result, this, index) } /** Gets a textual representation of this element. */ string toString() { result = "StringList" } } /** INTERNAL: See the class `StrListParent` for further information. */ class StrListParent_ extends @py_str_list_parent { /** Gets a textual representation of this element. */ string toString() { result = "StrListParent" } } /** INTERNAL: See the class `StrParent` for further information. */ class StrParent_ extends @py_str_parent { /** Gets a textual representation of this element. */ string toString() { result = "StrParent" } } /** INTERNAL: See the class `Unaryop` for further information. */ class Unaryop_ extends @py_unaryop { /** Gets a parent of this unary operation */ UnaryExpr getParent() { py_unaryops(this, _, result) } /** Gets a textual representation of this element. */ string toString() { result = "Unaryop" } } /** INTERNAL: See the class `VariableParent` for further information. */ class VariableParent_ extends @py_variable_parent { /** Gets a textual representation of this element. */ string toString() { result = "VariableParent" } }