CodeQL library for Python
codeql/python-all 2.2.0 (changelog, source)
Search

Class MatchClassPattern

A class pattern in a match statement: Circle(radius = 3)

Import path

import python

Direct supertypes

Indirect supertypes

Predicates

getASubExpression

Gets an immediate (non-nested) sub-expression of this pattern

getASubPattern

Gets an immediate (non-nested) sub-pattern of this pattern

Inherited predicates

contains

Whether this contains inner syntactically

from AstNode
containsInScope

Whether this contains inner syntactically and inner has the same scope as this

from AstNode
getAChildNode

Gets a child node of this node in the AST. This predicate exists to aid exploration of the AST and other experiments. The child-parent relation may not be meaningful. For a more meaningful relation in terms of dependency use Expr.getASubExpression(), Stmt.getASubStatement(), Stmt.getASubExpression() or Scope.getAStmt().

from Pattern
getAFlowNode

Gets a flow node corresponding directly to this node. NOTE: For some statements and other purely syntactic elements, there may not be a ControlFlowNode

from AstNode
getAKeyword

Gets a keyword of this matchclasspattern pattern.

from MatchClassPattern_
getAPositional

Gets a positional of this matchclasspattern pattern.

from MatchClassPattern_
getASubStatement

Gets an immediate (non-nested) sub-statement of this pattern

from Pattern
getCase

Gets the case statement containing this pattern

from Pattern
getClass

Gets the class of this matchclasspattern pattern.

from MatchClassPattern_
getClassName

Gets the class_name of this matchclasspattern pattern.

from MatchClassPattern_
getEnclosingModule

Gets the module enclosing this pattern

from Pattern
getKeyword

Gets the keyword of this matchclasspattern pattern.

from MatchClassPattern_
getKeyword

Gets the nth keyword of this matchclasspattern pattern.

from MatchClassPattern_
getLocationfrom Pattern
getParent

Gets a parent of this pattern

from Pattern_
getParentNode

Gets the parent node of this node in the AST. This predicate exists to aid exploration of the AST and other experiments. The child-parent relation may not be meaningful. For a more meaningful relation in terms of dependency use Expr.getASubExpression(), Stmt.getASubStatement(), Stmt.getASubExpression() or Scope.getAStmt() applied to the parent.

from AstNode
getPositional

Gets the positional of this matchclasspattern pattern.

from MatchClassPattern_
getPositional

Gets the nth positional of this matchclasspattern pattern.

from MatchClassPattern_
getScope

Gets the scope of this pattern

from Pattern
isArtificial

Whether this syntactic element is artificial, that is it is generated by the compiler and is not present in the source

from AstNode
isParenthesised

Whether the parenthesised property of this pattern is true.

from Pattern_
isParenthesized

Whether the parenthesized property of this expression is true.

from Pattern
toStringfrom MatchClassPattern_