From ef8cd27aa71b0e356498f5ad48ac6c2f3cf65cdc Mon Sep 17 00:00:00 2001 From: Aarni Koskela Date: Mon, 27 Nov 2023 20:38:21 +0200 Subject: [PATCH] Run codegen --- libcst/_typed_visitor.py | 14908 ++++++------- libcst/matchers/__init__.py | 32520 ++++++++++++++--------------- libcst/matchers/_return_types.py | 746 +- 3 files changed, 24088 insertions(+), 24086 deletions(-) diff --git a/libcst/_typed_visitor.py b/libcst/_typed_visitor.py index 860a85218..395edfc87 100644 --- a/libcst/_typed_visitor.py +++ b/libcst/_typed_visitor.py @@ -1,7453 +1,7455 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under the MIT license found in the -# LICENSE file in the root directory of this source tree. - - -# This file was generated by libcst.codegen.gen_matcher_classes -from typing import Optional, TYPE_CHECKING, Union - -from libcst._flatten_sentinel import FlattenSentinel -from libcst._maybe_sentinel import MaybeSentinel -from libcst._removal_sentinel import RemovalSentinel -from libcst._typed_visitor_base import mark_no_op - -if TYPE_CHECKING: - from libcst._nodes.expression import ( # noqa: F401 - Annotation, - Arg, - Asynchronous, - Attribute, - Await, - BaseDictElement, - BaseElement, - BaseExpression, - BaseFormattedStringContent, - BaseSlice, - BinaryOperation, - BooleanOperation, - Call, - Comparison, - ComparisonTarget, - CompFor, - CompIf, - ConcatenatedString, - Dict, - DictComp, - DictElement, - Element, - Ellipsis, - Float, - FormattedString, - FormattedStringExpression, - FormattedStringText, - From, - GeneratorExp, - IfExp, - Imaginary, - Index, - Integer, - Lambda, - LeftCurlyBrace, - LeftParen, - LeftSquareBracket, - List, - ListComp, - Name, - NamedExpr, - Param, - Parameters, - ParamSlash, - ParamStar, - RightCurlyBrace, - RightParen, - RightSquareBracket, - Set, - SetComp, - SimpleString, - Slice, - StarredDictElement, - StarredElement, - Subscript, - SubscriptElement, - Tuple, - UnaryOperation, - Yield, - ) - from libcst._nodes.module import Module # noqa: F401 - from libcst._nodes.op import ( # noqa: F401 - Add, - AddAssign, - And, - AssignEqual, - BaseAugOp, - BaseBinaryOp, - BaseBooleanOp, - BaseCompOp, - BaseUnaryOp, - BitAnd, - BitAndAssign, - BitInvert, - BitOr, - BitOrAssign, - BitXor, - BitXorAssign, - Colon, - Comma, - Divide, - DivideAssign, - Dot, - Equal, - FloorDivide, - FloorDivideAssign, - GreaterThan, - GreaterThanEqual, - ImportStar, - In, - Is, - IsNot, - LeftShift, - LeftShiftAssign, - LessThan, - LessThanEqual, - MatrixMultiply, - MatrixMultiplyAssign, - Minus, - Modulo, - ModuloAssign, - Multiply, - MultiplyAssign, - Not, - NotEqual, - NotIn, - Or, - Plus, - Power, - PowerAssign, - RightShift, - RightShiftAssign, - Semicolon, - Subtract, - SubtractAssign, - ) - from libcst._nodes.statement import ( # noqa: F401 - AnnAssign, - AsName, - Assert, - Assign, - AssignTarget, - AugAssign, - BaseSmallStatement, - BaseStatement, - BaseSuite, - Break, - ClassDef, - Continue, - Decorator, - Del, - Else, - ExceptHandler, - ExceptStarHandler, - Expr, - Finally, - For, - FunctionDef, - Global, - If, - Import, - ImportAlias, - ImportFrom, - IndentedBlock, - Match, - MatchAs, - MatchCase, - MatchClass, - MatchKeywordElement, - MatchList, - MatchMapping, - MatchMappingElement, - MatchOr, - MatchOrElement, - MatchPattern, - MatchSequence, - MatchSequenceElement, - MatchSingleton, - MatchStar, - MatchTuple, - MatchValue, - NameItem, - Nonlocal, - ParamSpec, - Pass, - Raise, - Return, - SimpleStatementLine, - SimpleStatementSuite, - Try, - TryStar, - TypeAlias, - TypeParam, - TypeParameters, - TypeVar, - TypeVarTuple, - While, - With, - WithItem, - ) - from libcst._nodes.whitespace import ( # noqa: F401 - BaseParenthesizableWhitespace, - Comment, - EmptyLine, - Newline, - ParenthesizedWhitespace, - SimpleWhitespace, - TrailingWhitespace, - ) - - -class CSTTypedBaseFunctions: - @mark_no_op - def visit_Add(self, node: "Add") -> Optional[bool]: - pass - - @mark_no_op - def visit_Add_whitespace_before(self, node: "Add") -> None: - pass - - @mark_no_op - def leave_Add_whitespace_before(self, node: "Add") -> None: - pass - - @mark_no_op - def visit_Add_whitespace_after(self, node: "Add") -> None: - pass - - @mark_no_op - def leave_Add_whitespace_after(self, node: "Add") -> None: - pass - - @mark_no_op - def visit_AddAssign(self, node: "AddAssign") -> Optional[bool]: - pass - - @mark_no_op - def visit_AddAssign_whitespace_before(self, node: "AddAssign") -> None: - pass - - @mark_no_op - def leave_AddAssign_whitespace_before(self, node: "AddAssign") -> None: - pass - - @mark_no_op - def visit_AddAssign_whitespace_after(self, node: "AddAssign") -> None: - pass - - @mark_no_op - def leave_AddAssign_whitespace_after(self, node: "AddAssign") -> None: - pass - - @mark_no_op - def visit_And(self, node: "And") -> Optional[bool]: - pass - - @mark_no_op - def visit_And_whitespace_before(self, node: "And") -> None: - pass - - @mark_no_op - def leave_And_whitespace_before(self, node: "And") -> None: - pass - - @mark_no_op - def visit_And_whitespace_after(self, node: "And") -> None: - pass - - @mark_no_op - def leave_And_whitespace_after(self, node: "And") -> None: - pass - - @mark_no_op - def visit_AnnAssign(self, node: "AnnAssign") -> Optional[bool]: - pass - - @mark_no_op - def visit_AnnAssign_target(self, node: "AnnAssign") -> None: - pass - - @mark_no_op - def leave_AnnAssign_target(self, node: "AnnAssign") -> None: - pass - - @mark_no_op - def visit_AnnAssign_annotation(self, node: "AnnAssign") -> None: - pass - - @mark_no_op - def leave_AnnAssign_annotation(self, node: "AnnAssign") -> None: - pass - - @mark_no_op - def visit_AnnAssign_value(self, node: "AnnAssign") -> None: - pass - - @mark_no_op - def leave_AnnAssign_value(self, node: "AnnAssign") -> None: - pass - - @mark_no_op - def visit_AnnAssign_equal(self, node: "AnnAssign") -> None: - pass - - @mark_no_op - def leave_AnnAssign_equal(self, node: "AnnAssign") -> None: - pass - - @mark_no_op - def visit_AnnAssign_semicolon(self, node: "AnnAssign") -> None: - pass - - @mark_no_op - def leave_AnnAssign_semicolon(self, node: "AnnAssign") -> None: - pass - - @mark_no_op - def visit_Annotation(self, node: "Annotation") -> Optional[bool]: - pass - - @mark_no_op - def visit_Annotation_annotation(self, node: "Annotation") -> None: - pass - - @mark_no_op - def leave_Annotation_annotation(self, node: "Annotation") -> None: - pass - - @mark_no_op - def visit_Annotation_whitespace_before_indicator(self, node: "Annotation") -> None: - pass - - @mark_no_op - def leave_Annotation_whitespace_before_indicator(self, node: "Annotation") -> None: - pass - - @mark_no_op - def visit_Annotation_whitespace_after_indicator(self, node: "Annotation") -> None: - pass - - @mark_no_op - def leave_Annotation_whitespace_after_indicator(self, node: "Annotation") -> None: - pass - - @mark_no_op - def visit_Arg(self, node: "Arg") -> Optional[bool]: - pass - - @mark_no_op - def visit_Arg_value(self, node: "Arg") -> None: - pass - - @mark_no_op - def leave_Arg_value(self, node: "Arg") -> None: - pass - - @mark_no_op - def visit_Arg_keyword(self, node: "Arg") -> None: - pass - - @mark_no_op - def leave_Arg_keyword(self, node: "Arg") -> None: - pass - - @mark_no_op - def visit_Arg_equal(self, node: "Arg") -> None: - pass - - @mark_no_op - def leave_Arg_equal(self, node: "Arg") -> None: - pass - - @mark_no_op - def visit_Arg_comma(self, node: "Arg") -> None: - pass - - @mark_no_op - def leave_Arg_comma(self, node: "Arg") -> None: - pass - - @mark_no_op - def visit_Arg_star(self, node: "Arg") -> None: - pass - - @mark_no_op - def leave_Arg_star(self, node: "Arg") -> None: - pass - - @mark_no_op - def visit_Arg_whitespace_after_star(self, node: "Arg") -> None: - pass - - @mark_no_op - def leave_Arg_whitespace_after_star(self, node: "Arg") -> None: - pass - - @mark_no_op - def visit_Arg_whitespace_after_arg(self, node: "Arg") -> None: - pass - - @mark_no_op - def leave_Arg_whitespace_after_arg(self, node: "Arg") -> None: - pass - - @mark_no_op - def visit_AsName(self, node: "AsName") -> Optional[bool]: - pass - - @mark_no_op - def visit_AsName_name(self, node: "AsName") -> None: - pass - - @mark_no_op - def leave_AsName_name(self, node: "AsName") -> None: - pass - - @mark_no_op - def visit_AsName_whitespace_before_as(self, node: "AsName") -> None: - pass - - @mark_no_op - def leave_AsName_whitespace_before_as(self, node: "AsName") -> None: - pass - - @mark_no_op - def visit_AsName_whitespace_after_as(self, node: "AsName") -> None: - pass - - @mark_no_op - def leave_AsName_whitespace_after_as(self, node: "AsName") -> None: - pass - - @mark_no_op - def visit_Assert(self, node: "Assert") -> Optional[bool]: - pass - - @mark_no_op - def visit_Assert_test(self, node: "Assert") -> None: - pass - - @mark_no_op - def leave_Assert_test(self, node: "Assert") -> None: - pass - - @mark_no_op - def visit_Assert_msg(self, node: "Assert") -> None: - pass - - @mark_no_op - def leave_Assert_msg(self, node: "Assert") -> None: - pass - - @mark_no_op - def visit_Assert_comma(self, node: "Assert") -> None: - pass - - @mark_no_op - def leave_Assert_comma(self, node: "Assert") -> None: - pass - - @mark_no_op - def visit_Assert_whitespace_after_assert(self, node: "Assert") -> None: - pass - - @mark_no_op - def leave_Assert_whitespace_after_assert(self, node: "Assert") -> None: - pass - - @mark_no_op - def visit_Assert_semicolon(self, node: "Assert") -> None: - pass - - @mark_no_op - def leave_Assert_semicolon(self, node: "Assert") -> None: - pass - - @mark_no_op - def visit_Assign(self, node: "Assign") -> Optional[bool]: - pass - - @mark_no_op - def visit_Assign_targets(self, node: "Assign") -> None: - pass - - @mark_no_op - def leave_Assign_targets(self, node: "Assign") -> None: - pass - - @mark_no_op - def visit_Assign_value(self, node: "Assign") -> None: - pass - - @mark_no_op - def leave_Assign_value(self, node: "Assign") -> None: - pass - - @mark_no_op - def visit_Assign_semicolon(self, node: "Assign") -> None: - pass - - @mark_no_op - def leave_Assign_semicolon(self, node: "Assign") -> None: - pass - - @mark_no_op - def visit_AssignEqual(self, node: "AssignEqual") -> Optional[bool]: - pass - - @mark_no_op - def visit_AssignEqual_whitespace_before(self, node: "AssignEqual") -> None: - pass - - @mark_no_op - def leave_AssignEqual_whitespace_before(self, node: "AssignEqual") -> None: - pass - - @mark_no_op - def visit_AssignEqual_whitespace_after(self, node: "AssignEqual") -> None: - pass - - @mark_no_op - def leave_AssignEqual_whitespace_after(self, node: "AssignEqual") -> None: - pass - - @mark_no_op - def visit_AssignTarget(self, node: "AssignTarget") -> Optional[bool]: - pass - - @mark_no_op - def visit_AssignTarget_target(self, node: "AssignTarget") -> None: - pass - - @mark_no_op - def leave_AssignTarget_target(self, node: "AssignTarget") -> None: - pass - - @mark_no_op - def visit_AssignTarget_whitespace_before_equal(self, node: "AssignTarget") -> None: - pass - - @mark_no_op - def leave_AssignTarget_whitespace_before_equal(self, node: "AssignTarget") -> None: - pass - - @mark_no_op - def visit_AssignTarget_whitespace_after_equal(self, node: "AssignTarget") -> None: - pass - - @mark_no_op - def leave_AssignTarget_whitespace_after_equal(self, node: "AssignTarget") -> None: - pass - - @mark_no_op - def visit_Asynchronous(self, node: "Asynchronous") -> Optional[bool]: - pass - - @mark_no_op - def visit_Asynchronous_whitespace_after(self, node: "Asynchronous") -> None: - pass - - @mark_no_op - def leave_Asynchronous_whitespace_after(self, node: "Asynchronous") -> None: - pass - - @mark_no_op - def visit_Attribute(self, node: "Attribute") -> Optional[bool]: - pass - - @mark_no_op - def visit_Attribute_value(self, node: "Attribute") -> None: - pass - - @mark_no_op - def leave_Attribute_value(self, node: "Attribute") -> None: - pass - - @mark_no_op - def visit_Attribute_attr(self, node: "Attribute") -> None: - pass - - @mark_no_op - def leave_Attribute_attr(self, node: "Attribute") -> None: - pass - - @mark_no_op - def visit_Attribute_dot(self, node: "Attribute") -> None: - pass - - @mark_no_op - def leave_Attribute_dot(self, node: "Attribute") -> None: - pass - - @mark_no_op - def visit_Attribute_lpar(self, node: "Attribute") -> None: - pass - - @mark_no_op - def leave_Attribute_lpar(self, node: "Attribute") -> None: - pass - - @mark_no_op - def visit_Attribute_rpar(self, node: "Attribute") -> None: - pass - - @mark_no_op - def leave_Attribute_rpar(self, node: "Attribute") -> None: - pass - - @mark_no_op - def visit_AugAssign(self, node: "AugAssign") -> Optional[bool]: - pass - - @mark_no_op - def visit_AugAssign_target(self, node: "AugAssign") -> None: - pass - - @mark_no_op - def leave_AugAssign_target(self, node: "AugAssign") -> None: - pass - - @mark_no_op - def visit_AugAssign_operator(self, node: "AugAssign") -> None: - pass - - @mark_no_op - def leave_AugAssign_operator(self, node: "AugAssign") -> None: - pass - - @mark_no_op - def visit_AugAssign_value(self, node: "AugAssign") -> None: - pass - - @mark_no_op - def leave_AugAssign_value(self, node: "AugAssign") -> None: - pass - - @mark_no_op - def visit_AugAssign_semicolon(self, node: "AugAssign") -> None: - pass - - @mark_no_op - def leave_AugAssign_semicolon(self, node: "AugAssign") -> None: - pass - - @mark_no_op - def visit_Await(self, node: "Await") -> Optional[bool]: - pass - - @mark_no_op - def visit_Await_expression(self, node: "Await") -> None: - pass - - @mark_no_op - def leave_Await_expression(self, node: "Await") -> None: - pass - - @mark_no_op - def visit_Await_lpar(self, node: "Await") -> None: - pass - - @mark_no_op - def leave_Await_lpar(self, node: "Await") -> None: - pass - - @mark_no_op - def visit_Await_rpar(self, node: "Await") -> None: - pass - - @mark_no_op - def leave_Await_rpar(self, node: "Await") -> None: - pass - - @mark_no_op - def visit_Await_whitespace_after_await(self, node: "Await") -> None: - pass - - @mark_no_op - def leave_Await_whitespace_after_await(self, node: "Await") -> None: - pass - - @mark_no_op - def visit_BinaryOperation(self, node: "BinaryOperation") -> Optional[bool]: - pass - - @mark_no_op - def visit_BinaryOperation_left(self, node: "BinaryOperation") -> None: - pass - - @mark_no_op - def leave_BinaryOperation_left(self, node: "BinaryOperation") -> None: - pass - - @mark_no_op - def visit_BinaryOperation_operator(self, node: "BinaryOperation") -> None: - pass - - @mark_no_op - def leave_BinaryOperation_operator(self, node: "BinaryOperation") -> None: - pass - - @mark_no_op - def visit_BinaryOperation_right(self, node: "BinaryOperation") -> None: - pass - - @mark_no_op - def leave_BinaryOperation_right(self, node: "BinaryOperation") -> None: - pass - - @mark_no_op - def visit_BinaryOperation_lpar(self, node: "BinaryOperation") -> None: - pass - - @mark_no_op - def leave_BinaryOperation_lpar(self, node: "BinaryOperation") -> None: - pass - - @mark_no_op - def visit_BinaryOperation_rpar(self, node: "BinaryOperation") -> None: - pass - - @mark_no_op - def leave_BinaryOperation_rpar(self, node: "BinaryOperation") -> None: - pass - - @mark_no_op - def visit_BitAnd(self, node: "BitAnd") -> Optional[bool]: - pass - - @mark_no_op - def visit_BitAnd_whitespace_before(self, node: "BitAnd") -> None: - pass - - @mark_no_op - def leave_BitAnd_whitespace_before(self, node: "BitAnd") -> None: - pass - - @mark_no_op - def visit_BitAnd_whitespace_after(self, node: "BitAnd") -> None: - pass - - @mark_no_op - def leave_BitAnd_whitespace_after(self, node: "BitAnd") -> None: - pass - - @mark_no_op - def visit_BitAndAssign(self, node: "BitAndAssign") -> Optional[bool]: - pass - - @mark_no_op - def visit_BitAndAssign_whitespace_before(self, node: "BitAndAssign") -> None: - pass - - @mark_no_op - def leave_BitAndAssign_whitespace_before(self, node: "BitAndAssign") -> None: - pass - - @mark_no_op - def visit_BitAndAssign_whitespace_after(self, node: "BitAndAssign") -> None: - pass - - @mark_no_op - def leave_BitAndAssign_whitespace_after(self, node: "BitAndAssign") -> None: - pass - - @mark_no_op - def visit_BitInvert(self, node: "BitInvert") -> Optional[bool]: - pass - - @mark_no_op - def visit_BitInvert_whitespace_after(self, node: "BitInvert") -> None: - pass - - @mark_no_op - def leave_BitInvert_whitespace_after(self, node: "BitInvert") -> None: - pass - - @mark_no_op - def visit_BitOr(self, node: "BitOr") -> Optional[bool]: - pass - - @mark_no_op - def visit_BitOr_whitespace_before(self, node: "BitOr") -> None: - pass - - @mark_no_op - def leave_BitOr_whitespace_before(self, node: "BitOr") -> None: - pass - - @mark_no_op - def visit_BitOr_whitespace_after(self, node: "BitOr") -> None: - pass - - @mark_no_op - def leave_BitOr_whitespace_after(self, node: "BitOr") -> None: - pass - - @mark_no_op - def visit_BitOrAssign(self, node: "BitOrAssign") -> Optional[bool]: - pass - - @mark_no_op - def visit_BitOrAssign_whitespace_before(self, node: "BitOrAssign") -> None: - pass - - @mark_no_op - def leave_BitOrAssign_whitespace_before(self, node: "BitOrAssign") -> None: - pass - - @mark_no_op - def visit_BitOrAssign_whitespace_after(self, node: "BitOrAssign") -> None: - pass - - @mark_no_op - def leave_BitOrAssign_whitespace_after(self, node: "BitOrAssign") -> None: - pass - - @mark_no_op - def visit_BitXor(self, node: "BitXor") -> Optional[bool]: - pass - - @mark_no_op - def visit_BitXor_whitespace_before(self, node: "BitXor") -> None: - pass - - @mark_no_op - def leave_BitXor_whitespace_before(self, node: "BitXor") -> None: - pass - - @mark_no_op - def visit_BitXor_whitespace_after(self, node: "BitXor") -> None: - pass - - @mark_no_op - def leave_BitXor_whitespace_after(self, node: "BitXor") -> None: - pass - - @mark_no_op - def visit_BitXorAssign(self, node: "BitXorAssign") -> Optional[bool]: - pass - - @mark_no_op - def visit_BitXorAssign_whitespace_before(self, node: "BitXorAssign") -> None: - pass - - @mark_no_op - def leave_BitXorAssign_whitespace_before(self, node: "BitXorAssign") -> None: - pass - - @mark_no_op - def visit_BitXorAssign_whitespace_after(self, node: "BitXorAssign") -> None: - pass - - @mark_no_op - def leave_BitXorAssign_whitespace_after(self, node: "BitXorAssign") -> None: - pass - - @mark_no_op - def visit_BooleanOperation(self, node: "BooleanOperation") -> Optional[bool]: - pass - - @mark_no_op - def visit_BooleanOperation_left(self, node: "BooleanOperation") -> None: - pass - - @mark_no_op - def leave_BooleanOperation_left(self, node: "BooleanOperation") -> None: - pass - - @mark_no_op - def visit_BooleanOperation_operator(self, node: "BooleanOperation") -> None: - pass - - @mark_no_op - def leave_BooleanOperation_operator(self, node: "BooleanOperation") -> None: - pass - - @mark_no_op - def visit_BooleanOperation_right(self, node: "BooleanOperation") -> None: - pass - - @mark_no_op - def leave_BooleanOperation_right(self, node: "BooleanOperation") -> None: - pass - - @mark_no_op - def visit_BooleanOperation_lpar(self, node: "BooleanOperation") -> None: - pass - - @mark_no_op - def leave_BooleanOperation_lpar(self, node: "BooleanOperation") -> None: - pass - - @mark_no_op - def visit_BooleanOperation_rpar(self, node: "BooleanOperation") -> None: - pass - - @mark_no_op - def leave_BooleanOperation_rpar(self, node: "BooleanOperation") -> None: - pass - - @mark_no_op - def visit_Break(self, node: "Break") -> Optional[bool]: - pass - - @mark_no_op - def visit_Break_semicolon(self, node: "Break") -> None: - pass - - @mark_no_op - def leave_Break_semicolon(self, node: "Break") -> None: - pass - - @mark_no_op - def visit_Call(self, node: "Call") -> Optional[bool]: - pass - - @mark_no_op - def visit_Call_func(self, node: "Call") -> None: - pass - - @mark_no_op - def leave_Call_func(self, node: "Call") -> None: - pass - - @mark_no_op - def visit_Call_args(self, node: "Call") -> None: - pass - - @mark_no_op - def leave_Call_args(self, node: "Call") -> None: - pass - - @mark_no_op - def visit_Call_lpar(self, node: "Call") -> None: - pass - - @mark_no_op - def leave_Call_lpar(self, node: "Call") -> None: - pass - - @mark_no_op - def visit_Call_rpar(self, node: "Call") -> None: - pass - - @mark_no_op - def leave_Call_rpar(self, node: "Call") -> None: - pass - - @mark_no_op - def visit_Call_whitespace_after_func(self, node: "Call") -> None: - pass - - @mark_no_op - def leave_Call_whitespace_after_func(self, node: "Call") -> None: - pass - - @mark_no_op - def visit_Call_whitespace_before_args(self, node: "Call") -> None: - pass - - @mark_no_op - def leave_Call_whitespace_before_args(self, node: "Call") -> None: - pass - - @mark_no_op - def visit_ClassDef(self, node: "ClassDef") -> Optional[bool]: - pass - - @mark_no_op - def visit_ClassDef_name(self, node: "ClassDef") -> None: - pass - - @mark_no_op - def leave_ClassDef_name(self, node: "ClassDef") -> None: - pass - - @mark_no_op - def visit_ClassDef_body(self, node: "ClassDef") -> None: - pass - - @mark_no_op - def leave_ClassDef_body(self, node: "ClassDef") -> None: - pass - - @mark_no_op - def visit_ClassDef_bases(self, node: "ClassDef") -> None: - pass - - @mark_no_op - def leave_ClassDef_bases(self, node: "ClassDef") -> None: - pass - - @mark_no_op - def visit_ClassDef_keywords(self, node: "ClassDef") -> None: - pass - - @mark_no_op - def leave_ClassDef_keywords(self, node: "ClassDef") -> None: - pass - - @mark_no_op - def visit_ClassDef_decorators(self, node: "ClassDef") -> None: - pass - - @mark_no_op - def leave_ClassDef_decorators(self, node: "ClassDef") -> None: - pass - - @mark_no_op - def visit_ClassDef_lpar(self, node: "ClassDef") -> None: - pass - - @mark_no_op - def leave_ClassDef_lpar(self, node: "ClassDef") -> None: - pass - - @mark_no_op - def visit_ClassDef_rpar(self, node: "ClassDef") -> None: - pass - - @mark_no_op - def leave_ClassDef_rpar(self, node: "ClassDef") -> None: - pass - - @mark_no_op - def visit_ClassDef_leading_lines(self, node: "ClassDef") -> None: - pass - - @mark_no_op - def leave_ClassDef_leading_lines(self, node: "ClassDef") -> None: - pass - - @mark_no_op - def visit_ClassDef_lines_after_decorators(self, node: "ClassDef") -> None: - pass - - @mark_no_op - def leave_ClassDef_lines_after_decorators(self, node: "ClassDef") -> None: - pass - - @mark_no_op - def visit_ClassDef_whitespace_after_class(self, node: "ClassDef") -> None: - pass - - @mark_no_op - def leave_ClassDef_whitespace_after_class(self, node: "ClassDef") -> None: - pass - - @mark_no_op - def visit_ClassDef_whitespace_after_name(self, node: "ClassDef") -> None: - pass - - @mark_no_op - def leave_ClassDef_whitespace_after_name(self, node: "ClassDef") -> None: - pass - - @mark_no_op - def visit_ClassDef_whitespace_before_colon(self, node: "ClassDef") -> None: - pass - - @mark_no_op - def leave_ClassDef_whitespace_before_colon(self, node: "ClassDef") -> None: - pass - - @mark_no_op - def visit_ClassDef_type_parameters(self, node: "ClassDef") -> None: - pass - - @mark_no_op - def leave_ClassDef_type_parameters(self, node: "ClassDef") -> None: - pass - - @mark_no_op - def visit_ClassDef_whitespace_after_type_parameters(self, node: "ClassDef") -> None: - pass - - @mark_no_op - def leave_ClassDef_whitespace_after_type_parameters(self, node: "ClassDef") -> None: - pass - - @mark_no_op - def visit_Colon(self, node: "Colon") -> Optional[bool]: - pass - - @mark_no_op - def visit_Colon_whitespace_before(self, node: "Colon") -> None: - pass - - @mark_no_op - def leave_Colon_whitespace_before(self, node: "Colon") -> None: - pass - - @mark_no_op - def visit_Colon_whitespace_after(self, node: "Colon") -> None: - pass - - @mark_no_op - def leave_Colon_whitespace_after(self, node: "Colon") -> None: - pass - - @mark_no_op - def visit_Comma(self, node: "Comma") -> Optional[bool]: - pass - - @mark_no_op - def visit_Comma_whitespace_before(self, node: "Comma") -> None: - pass - - @mark_no_op - def leave_Comma_whitespace_before(self, node: "Comma") -> None: - pass - - @mark_no_op - def visit_Comma_whitespace_after(self, node: "Comma") -> None: - pass - - @mark_no_op - def leave_Comma_whitespace_after(self, node: "Comma") -> None: - pass - - @mark_no_op - def visit_Comment(self, node: "Comment") -> Optional[bool]: - pass - - @mark_no_op - def visit_Comment_value(self, node: "Comment") -> None: - pass - - @mark_no_op - def leave_Comment_value(self, node: "Comment") -> None: - pass - - @mark_no_op - def visit_CompFor(self, node: "CompFor") -> Optional[bool]: - pass - - @mark_no_op - def visit_CompFor_target(self, node: "CompFor") -> None: - pass - - @mark_no_op - def leave_CompFor_target(self, node: "CompFor") -> None: - pass - - @mark_no_op - def visit_CompFor_iter(self, node: "CompFor") -> None: - pass - - @mark_no_op - def leave_CompFor_iter(self, node: "CompFor") -> None: - pass - - @mark_no_op - def visit_CompFor_ifs(self, node: "CompFor") -> None: - pass - - @mark_no_op - def leave_CompFor_ifs(self, node: "CompFor") -> None: - pass - - @mark_no_op - def visit_CompFor_inner_for_in(self, node: "CompFor") -> None: - pass - - @mark_no_op - def leave_CompFor_inner_for_in(self, node: "CompFor") -> None: - pass - - @mark_no_op - def visit_CompFor_asynchronous(self, node: "CompFor") -> None: - pass - - @mark_no_op - def leave_CompFor_asynchronous(self, node: "CompFor") -> None: - pass - - @mark_no_op - def visit_CompFor_whitespace_before(self, node: "CompFor") -> None: - pass - - @mark_no_op - def leave_CompFor_whitespace_before(self, node: "CompFor") -> None: - pass - - @mark_no_op - def visit_CompFor_whitespace_after_for(self, node: "CompFor") -> None: - pass - - @mark_no_op - def leave_CompFor_whitespace_after_for(self, node: "CompFor") -> None: - pass - - @mark_no_op - def visit_CompFor_whitespace_before_in(self, node: "CompFor") -> None: - pass - - @mark_no_op - def leave_CompFor_whitespace_before_in(self, node: "CompFor") -> None: - pass - - @mark_no_op - def visit_CompFor_whitespace_after_in(self, node: "CompFor") -> None: - pass - - @mark_no_op - def leave_CompFor_whitespace_after_in(self, node: "CompFor") -> None: - pass - - @mark_no_op - def visit_CompIf(self, node: "CompIf") -> Optional[bool]: - pass - - @mark_no_op - def visit_CompIf_test(self, node: "CompIf") -> None: - pass - - @mark_no_op - def leave_CompIf_test(self, node: "CompIf") -> None: - pass - - @mark_no_op - def visit_CompIf_whitespace_before(self, node: "CompIf") -> None: - pass - - @mark_no_op - def leave_CompIf_whitespace_before(self, node: "CompIf") -> None: - pass - - @mark_no_op - def visit_CompIf_whitespace_before_test(self, node: "CompIf") -> None: - pass - - @mark_no_op - def leave_CompIf_whitespace_before_test(self, node: "CompIf") -> None: - pass - - @mark_no_op - def visit_Comparison(self, node: "Comparison") -> Optional[bool]: - pass - - @mark_no_op - def visit_Comparison_left(self, node: "Comparison") -> None: - pass - - @mark_no_op - def leave_Comparison_left(self, node: "Comparison") -> None: - pass - - @mark_no_op - def visit_Comparison_comparisons(self, node: "Comparison") -> None: - pass - - @mark_no_op - def leave_Comparison_comparisons(self, node: "Comparison") -> None: - pass - - @mark_no_op - def visit_Comparison_lpar(self, node: "Comparison") -> None: - pass - - @mark_no_op - def leave_Comparison_lpar(self, node: "Comparison") -> None: - pass - - @mark_no_op - def visit_Comparison_rpar(self, node: "Comparison") -> None: - pass - - @mark_no_op - def leave_Comparison_rpar(self, node: "Comparison") -> None: - pass - - @mark_no_op - def visit_ComparisonTarget(self, node: "ComparisonTarget") -> Optional[bool]: - pass - - @mark_no_op - def visit_ComparisonTarget_operator(self, node: "ComparisonTarget") -> None: - pass - - @mark_no_op - def leave_ComparisonTarget_operator(self, node: "ComparisonTarget") -> None: - pass - - @mark_no_op - def visit_ComparisonTarget_comparator(self, node: "ComparisonTarget") -> None: - pass - - @mark_no_op - def leave_ComparisonTarget_comparator(self, node: "ComparisonTarget") -> None: - pass - - @mark_no_op - def visit_ConcatenatedString(self, node: "ConcatenatedString") -> Optional[bool]: - pass - - @mark_no_op - def visit_ConcatenatedString_left(self, node: "ConcatenatedString") -> None: - pass - - @mark_no_op - def leave_ConcatenatedString_left(self, node: "ConcatenatedString") -> None: - pass - - @mark_no_op - def visit_ConcatenatedString_right(self, node: "ConcatenatedString") -> None: - pass - - @mark_no_op - def leave_ConcatenatedString_right(self, node: "ConcatenatedString") -> None: - pass - - @mark_no_op - def visit_ConcatenatedString_lpar(self, node: "ConcatenatedString") -> None: - pass - - @mark_no_op - def leave_ConcatenatedString_lpar(self, node: "ConcatenatedString") -> None: - pass - - @mark_no_op - def visit_ConcatenatedString_rpar(self, node: "ConcatenatedString") -> None: - pass - - @mark_no_op - def leave_ConcatenatedString_rpar(self, node: "ConcatenatedString") -> None: - pass - - @mark_no_op - def visit_ConcatenatedString_whitespace_between( - self, node: "ConcatenatedString" - ) -> None: - pass - - @mark_no_op - def leave_ConcatenatedString_whitespace_between( - self, node: "ConcatenatedString" - ) -> None: - pass - - @mark_no_op - def visit_Continue(self, node: "Continue") -> Optional[bool]: - pass - - @mark_no_op - def visit_Continue_semicolon(self, node: "Continue") -> None: - pass - - @mark_no_op - def leave_Continue_semicolon(self, node: "Continue") -> None: - pass - - @mark_no_op - def visit_Decorator(self, node: "Decorator") -> Optional[bool]: - pass - - @mark_no_op - def visit_Decorator_decorator(self, node: "Decorator") -> None: - pass - - @mark_no_op - def leave_Decorator_decorator(self, node: "Decorator") -> None: - pass - - @mark_no_op - def visit_Decorator_leading_lines(self, node: "Decorator") -> None: - pass - - @mark_no_op - def leave_Decorator_leading_lines(self, node: "Decorator") -> None: - pass - - @mark_no_op - def visit_Decorator_whitespace_after_at(self, node: "Decorator") -> None: - pass - - @mark_no_op - def leave_Decorator_whitespace_after_at(self, node: "Decorator") -> None: - pass - - @mark_no_op - def visit_Decorator_trailing_whitespace(self, node: "Decorator") -> None: - pass - - @mark_no_op - def leave_Decorator_trailing_whitespace(self, node: "Decorator") -> None: - pass - - @mark_no_op - def visit_Del(self, node: "Del") -> Optional[bool]: - pass - - @mark_no_op - def visit_Del_target(self, node: "Del") -> None: - pass - - @mark_no_op - def leave_Del_target(self, node: "Del") -> None: - pass - - @mark_no_op - def visit_Del_whitespace_after_del(self, node: "Del") -> None: - pass - - @mark_no_op - def leave_Del_whitespace_after_del(self, node: "Del") -> None: - pass - - @mark_no_op - def visit_Del_semicolon(self, node: "Del") -> None: - pass - - @mark_no_op - def leave_Del_semicolon(self, node: "Del") -> None: - pass - - @mark_no_op - def visit_Dict(self, node: "Dict") -> Optional[bool]: - pass - - @mark_no_op - def visit_Dict_elements(self, node: "Dict") -> None: - pass - - @mark_no_op - def leave_Dict_elements(self, node: "Dict") -> None: - pass - - @mark_no_op - def visit_Dict_lbrace(self, node: "Dict") -> None: - pass - - @mark_no_op - def leave_Dict_lbrace(self, node: "Dict") -> None: - pass - - @mark_no_op - def visit_Dict_rbrace(self, node: "Dict") -> None: - pass - - @mark_no_op - def leave_Dict_rbrace(self, node: "Dict") -> None: - pass - - @mark_no_op - def visit_Dict_lpar(self, node: "Dict") -> None: - pass - - @mark_no_op - def leave_Dict_lpar(self, node: "Dict") -> None: - pass - - @mark_no_op - def visit_Dict_rpar(self, node: "Dict") -> None: - pass - - @mark_no_op - def leave_Dict_rpar(self, node: "Dict") -> None: - pass - - @mark_no_op - def visit_DictComp(self, node: "DictComp") -> Optional[bool]: - pass - - @mark_no_op - def visit_DictComp_key(self, node: "DictComp") -> None: - pass - - @mark_no_op - def leave_DictComp_key(self, node: "DictComp") -> None: - pass - - @mark_no_op - def visit_DictComp_value(self, node: "DictComp") -> None: - pass - - @mark_no_op - def leave_DictComp_value(self, node: "DictComp") -> None: - pass - - @mark_no_op - def visit_DictComp_for_in(self, node: "DictComp") -> None: - pass - - @mark_no_op - def leave_DictComp_for_in(self, node: "DictComp") -> None: - pass - - @mark_no_op - def visit_DictComp_lbrace(self, node: "DictComp") -> None: - pass - - @mark_no_op - def leave_DictComp_lbrace(self, node: "DictComp") -> None: - pass - - @mark_no_op - def visit_DictComp_rbrace(self, node: "DictComp") -> None: - pass - - @mark_no_op - def leave_DictComp_rbrace(self, node: "DictComp") -> None: - pass - - @mark_no_op - def visit_DictComp_lpar(self, node: "DictComp") -> None: - pass - - @mark_no_op - def leave_DictComp_lpar(self, node: "DictComp") -> None: - pass - - @mark_no_op - def visit_DictComp_rpar(self, node: "DictComp") -> None: - pass - - @mark_no_op - def leave_DictComp_rpar(self, node: "DictComp") -> None: - pass - - @mark_no_op - def visit_DictComp_whitespace_before_colon(self, node: "DictComp") -> None: - pass - - @mark_no_op - def leave_DictComp_whitespace_before_colon(self, node: "DictComp") -> None: - pass - - @mark_no_op - def visit_DictComp_whitespace_after_colon(self, node: "DictComp") -> None: - pass - - @mark_no_op - def leave_DictComp_whitespace_after_colon(self, node: "DictComp") -> None: - pass - - @mark_no_op - def visit_DictElement(self, node: "DictElement") -> Optional[bool]: - pass - - @mark_no_op - def visit_DictElement_key(self, node: "DictElement") -> None: - pass - - @mark_no_op - def leave_DictElement_key(self, node: "DictElement") -> None: - pass - - @mark_no_op - def visit_DictElement_value(self, node: "DictElement") -> None: - pass - - @mark_no_op - def leave_DictElement_value(self, node: "DictElement") -> None: - pass - - @mark_no_op - def visit_DictElement_comma(self, node: "DictElement") -> None: - pass - - @mark_no_op - def leave_DictElement_comma(self, node: "DictElement") -> None: - pass - - @mark_no_op - def visit_DictElement_whitespace_before_colon(self, node: "DictElement") -> None: - pass - - @mark_no_op - def leave_DictElement_whitespace_before_colon(self, node: "DictElement") -> None: - pass - - @mark_no_op - def visit_DictElement_whitespace_after_colon(self, node: "DictElement") -> None: - pass - - @mark_no_op - def leave_DictElement_whitespace_after_colon(self, node: "DictElement") -> None: - pass - - @mark_no_op - def visit_Divide(self, node: "Divide") -> Optional[bool]: - pass - - @mark_no_op - def visit_Divide_whitespace_before(self, node: "Divide") -> None: - pass - - @mark_no_op - def leave_Divide_whitespace_before(self, node: "Divide") -> None: - pass - - @mark_no_op - def visit_Divide_whitespace_after(self, node: "Divide") -> None: - pass - - @mark_no_op - def leave_Divide_whitespace_after(self, node: "Divide") -> None: - pass - - @mark_no_op - def visit_DivideAssign(self, node: "DivideAssign") -> Optional[bool]: - pass - - @mark_no_op - def visit_DivideAssign_whitespace_before(self, node: "DivideAssign") -> None: - pass - - @mark_no_op - def leave_DivideAssign_whitespace_before(self, node: "DivideAssign") -> None: - pass - - @mark_no_op - def visit_DivideAssign_whitespace_after(self, node: "DivideAssign") -> None: - pass - - @mark_no_op - def leave_DivideAssign_whitespace_after(self, node: "DivideAssign") -> None: - pass - - @mark_no_op - def visit_Dot(self, node: "Dot") -> Optional[bool]: - pass - - @mark_no_op - def visit_Dot_whitespace_before(self, node: "Dot") -> None: - pass - - @mark_no_op - def leave_Dot_whitespace_before(self, node: "Dot") -> None: - pass - - @mark_no_op - def visit_Dot_whitespace_after(self, node: "Dot") -> None: - pass - - @mark_no_op - def leave_Dot_whitespace_after(self, node: "Dot") -> None: - pass - - @mark_no_op - def visit_Element(self, node: "Element") -> Optional[bool]: - pass - - @mark_no_op - def visit_Element_value(self, node: "Element") -> None: - pass - - @mark_no_op - def leave_Element_value(self, node: "Element") -> None: - pass - - @mark_no_op - def visit_Element_comma(self, node: "Element") -> None: - pass - - @mark_no_op - def leave_Element_comma(self, node: "Element") -> None: - pass - - @mark_no_op - def visit_Ellipsis(self, node: "Ellipsis") -> Optional[bool]: - pass - - @mark_no_op - def visit_Ellipsis_lpar(self, node: "Ellipsis") -> None: - pass - - @mark_no_op - def leave_Ellipsis_lpar(self, node: "Ellipsis") -> None: - pass - - @mark_no_op - def visit_Ellipsis_rpar(self, node: "Ellipsis") -> None: - pass - - @mark_no_op - def leave_Ellipsis_rpar(self, node: "Ellipsis") -> None: - pass - - @mark_no_op - def visit_Else(self, node: "Else") -> Optional[bool]: - pass - - @mark_no_op - def visit_Else_body(self, node: "Else") -> None: - pass - - @mark_no_op - def leave_Else_body(self, node: "Else") -> None: - pass - - @mark_no_op - def visit_Else_leading_lines(self, node: "Else") -> None: - pass - - @mark_no_op - def leave_Else_leading_lines(self, node: "Else") -> None: - pass - - @mark_no_op - def visit_Else_whitespace_before_colon(self, node: "Else") -> None: - pass - - @mark_no_op - def leave_Else_whitespace_before_colon(self, node: "Else") -> None: - pass - - @mark_no_op - def visit_EmptyLine(self, node: "EmptyLine") -> Optional[bool]: - pass - - @mark_no_op - def visit_EmptyLine_indent(self, node: "EmptyLine") -> None: - pass - - @mark_no_op - def leave_EmptyLine_indent(self, node: "EmptyLine") -> None: - pass - - @mark_no_op - def visit_EmptyLine_whitespace(self, node: "EmptyLine") -> None: - pass - - @mark_no_op - def leave_EmptyLine_whitespace(self, node: "EmptyLine") -> None: - pass - - @mark_no_op - def visit_EmptyLine_comment(self, node: "EmptyLine") -> None: - pass - - @mark_no_op - def leave_EmptyLine_comment(self, node: "EmptyLine") -> None: - pass - - @mark_no_op - def visit_EmptyLine_newline(self, node: "EmptyLine") -> None: - pass - - @mark_no_op - def leave_EmptyLine_newline(self, node: "EmptyLine") -> None: - pass - - @mark_no_op - def visit_Equal(self, node: "Equal") -> Optional[bool]: - pass - - @mark_no_op - def visit_Equal_whitespace_before(self, node: "Equal") -> None: - pass - - @mark_no_op - def leave_Equal_whitespace_before(self, node: "Equal") -> None: - pass - - @mark_no_op - def visit_Equal_whitespace_after(self, node: "Equal") -> None: - pass - - @mark_no_op - def leave_Equal_whitespace_after(self, node: "Equal") -> None: - pass - - @mark_no_op - def visit_ExceptHandler(self, node: "ExceptHandler") -> Optional[bool]: - pass - - @mark_no_op - def visit_ExceptHandler_body(self, node: "ExceptHandler") -> None: - pass - - @mark_no_op - def leave_ExceptHandler_body(self, node: "ExceptHandler") -> None: - pass - - @mark_no_op - def visit_ExceptHandler_type(self, node: "ExceptHandler") -> None: - pass - - @mark_no_op - def leave_ExceptHandler_type(self, node: "ExceptHandler") -> None: - pass - - @mark_no_op - def visit_ExceptHandler_name(self, node: "ExceptHandler") -> None: - pass - - @mark_no_op - def leave_ExceptHandler_name(self, node: "ExceptHandler") -> None: - pass - - @mark_no_op - def visit_ExceptHandler_leading_lines(self, node: "ExceptHandler") -> None: - pass - - @mark_no_op - def leave_ExceptHandler_leading_lines(self, node: "ExceptHandler") -> None: - pass - - @mark_no_op - def visit_ExceptHandler_whitespace_after_except( - self, node: "ExceptHandler" - ) -> None: - pass - - @mark_no_op - def leave_ExceptHandler_whitespace_after_except( - self, node: "ExceptHandler" - ) -> None: - pass - - @mark_no_op - def visit_ExceptHandler_whitespace_before_colon( - self, node: "ExceptHandler" - ) -> None: - pass - - @mark_no_op - def leave_ExceptHandler_whitespace_before_colon( - self, node: "ExceptHandler" - ) -> None: - pass - - @mark_no_op - def visit_ExceptStarHandler(self, node: "ExceptStarHandler") -> Optional[bool]: - pass - - @mark_no_op - def visit_ExceptStarHandler_body(self, node: "ExceptStarHandler") -> None: - pass - - @mark_no_op - def leave_ExceptStarHandler_body(self, node: "ExceptStarHandler") -> None: - pass - - @mark_no_op - def visit_ExceptStarHandler_type(self, node: "ExceptStarHandler") -> None: - pass - - @mark_no_op - def leave_ExceptStarHandler_type(self, node: "ExceptStarHandler") -> None: - pass - - @mark_no_op - def visit_ExceptStarHandler_name(self, node: "ExceptStarHandler") -> None: - pass - - @mark_no_op - def leave_ExceptStarHandler_name(self, node: "ExceptStarHandler") -> None: - pass - - @mark_no_op - def visit_ExceptStarHandler_leading_lines(self, node: "ExceptStarHandler") -> None: - pass - - @mark_no_op - def leave_ExceptStarHandler_leading_lines(self, node: "ExceptStarHandler") -> None: - pass - - @mark_no_op - def visit_ExceptStarHandler_whitespace_after_except( - self, node: "ExceptStarHandler" - ) -> None: - pass - - @mark_no_op - def leave_ExceptStarHandler_whitespace_after_except( - self, node: "ExceptStarHandler" - ) -> None: - pass - - @mark_no_op - def visit_ExceptStarHandler_whitespace_after_star( - self, node: "ExceptStarHandler" - ) -> None: - pass - - @mark_no_op - def leave_ExceptStarHandler_whitespace_after_star( - self, node: "ExceptStarHandler" - ) -> None: - pass - - @mark_no_op - def visit_ExceptStarHandler_whitespace_before_colon( - self, node: "ExceptStarHandler" - ) -> None: - pass - - @mark_no_op - def leave_ExceptStarHandler_whitespace_before_colon( - self, node: "ExceptStarHandler" - ) -> None: - pass - - @mark_no_op - def visit_Expr(self, node: "Expr") -> Optional[bool]: - pass - - @mark_no_op - def visit_Expr_value(self, node: "Expr") -> None: - pass - - @mark_no_op - def leave_Expr_value(self, node: "Expr") -> None: - pass - - @mark_no_op - def visit_Expr_semicolon(self, node: "Expr") -> None: - pass - - @mark_no_op - def leave_Expr_semicolon(self, node: "Expr") -> None: - pass - - @mark_no_op - def visit_Finally(self, node: "Finally") -> Optional[bool]: - pass - - @mark_no_op - def visit_Finally_body(self, node: "Finally") -> None: - pass - - @mark_no_op - def leave_Finally_body(self, node: "Finally") -> None: - pass - - @mark_no_op - def visit_Finally_leading_lines(self, node: "Finally") -> None: - pass - - @mark_no_op - def leave_Finally_leading_lines(self, node: "Finally") -> None: - pass - - @mark_no_op - def visit_Finally_whitespace_before_colon(self, node: "Finally") -> None: - pass - - @mark_no_op - def leave_Finally_whitespace_before_colon(self, node: "Finally") -> None: - pass - - @mark_no_op - def visit_Float(self, node: "Float") -> Optional[bool]: - pass - - @mark_no_op - def visit_Float_value(self, node: "Float") -> None: - pass - - @mark_no_op - def leave_Float_value(self, node: "Float") -> None: - pass - - @mark_no_op - def visit_Float_lpar(self, node: "Float") -> None: - pass - - @mark_no_op - def leave_Float_lpar(self, node: "Float") -> None: - pass - - @mark_no_op - def visit_Float_rpar(self, node: "Float") -> None: - pass - - @mark_no_op - def leave_Float_rpar(self, node: "Float") -> None: - pass - - @mark_no_op - def visit_FloorDivide(self, node: "FloorDivide") -> Optional[bool]: - pass - - @mark_no_op - def visit_FloorDivide_whitespace_before(self, node: "FloorDivide") -> None: - pass - - @mark_no_op - def leave_FloorDivide_whitespace_before(self, node: "FloorDivide") -> None: - pass - - @mark_no_op - def visit_FloorDivide_whitespace_after(self, node: "FloorDivide") -> None: - pass - - @mark_no_op - def leave_FloorDivide_whitespace_after(self, node: "FloorDivide") -> None: - pass - - @mark_no_op - def visit_FloorDivideAssign(self, node: "FloorDivideAssign") -> Optional[bool]: - pass - - @mark_no_op - def visit_FloorDivideAssign_whitespace_before( - self, node: "FloorDivideAssign" - ) -> None: - pass - - @mark_no_op - def leave_FloorDivideAssign_whitespace_before( - self, node: "FloorDivideAssign" - ) -> None: - pass - - @mark_no_op - def visit_FloorDivideAssign_whitespace_after( - self, node: "FloorDivideAssign" - ) -> None: - pass - - @mark_no_op - def leave_FloorDivideAssign_whitespace_after( - self, node: "FloorDivideAssign" - ) -> None: - pass - - @mark_no_op - def visit_For(self, node: "For") -> Optional[bool]: - pass - - @mark_no_op - def visit_For_target(self, node: "For") -> None: - pass - - @mark_no_op - def leave_For_target(self, node: "For") -> None: - pass - - @mark_no_op - def visit_For_iter(self, node: "For") -> None: - pass - - @mark_no_op - def leave_For_iter(self, node: "For") -> None: - pass - - @mark_no_op - def visit_For_body(self, node: "For") -> None: - pass - - @mark_no_op - def leave_For_body(self, node: "For") -> None: - pass - - @mark_no_op - def visit_For_orelse(self, node: "For") -> None: - pass - - @mark_no_op - def leave_For_orelse(self, node: "For") -> None: - pass - - @mark_no_op - def visit_For_asynchronous(self, node: "For") -> None: - pass - - @mark_no_op - def leave_For_asynchronous(self, node: "For") -> None: - pass - - @mark_no_op - def visit_For_leading_lines(self, node: "For") -> None: - pass - - @mark_no_op - def leave_For_leading_lines(self, node: "For") -> None: - pass - - @mark_no_op - def visit_For_whitespace_after_for(self, node: "For") -> None: - pass - - @mark_no_op - def leave_For_whitespace_after_for(self, node: "For") -> None: - pass - - @mark_no_op - def visit_For_whitespace_before_in(self, node: "For") -> None: - pass - - @mark_no_op - def leave_For_whitespace_before_in(self, node: "For") -> None: - pass - - @mark_no_op - def visit_For_whitespace_after_in(self, node: "For") -> None: - pass - - @mark_no_op - def leave_For_whitespace_after_in(self, node: "For") -> None: - pass - - @mark_no_op - def visit_For_whitespace_before_colon(self, node: "For") -> None: - pass - - @mark_no_op - def leave_For_whitespace_before_colon(self, node: "For") -> None: - pass - - @mark_no_op - def visit_FormattedString(self, node: "FormattedString") -> Optional[bool]: - pass - - @mark_no_op - def visit_FormattedString_parts(self, node: "FormattedString") -> None: - pass - - @mark_no_op - def leave_FormattedString_parts(self, node: "FormattedString") -> None: - pass - - @mark_no_op - def visit_FormattedString_start(self, node: "FormattedString") -> None: - pass - - @mark_no_op - def leave_FormattedString_start(self, node: "FormattedString") -> None: - pass - - @mark_no_op - def visit_FormattedString_end(self, node: "FormattedString") -> None: - pass - - @mark_no_op - def leave_FormattedString_end(self, node: "FormattedString") -> None: - pass - - @mark_no_op - def visit_FormattedString_lpar(self, node: "FormattedString") -> None: - pass - - @mark_no_op - def leave_FormattedString_lpar(self, node: "FormattedString") -> None: - pass - - @mark_no_op - def visit_FormattedString_rpar(self, node: "FormattedString") -> None: - pass - - @mark_no_op - def leave_FormattedString_rpar(self, node: "FormattedString") -> None: - pass - - @mark_no_op - def visit_FormattedStringExpression( - self, node: "FormattedStringExpression" - ) -> Optional[bool]: - pass - - @mark_no_op - def visit_FormattedStringExpression_expression( - self, node: "FormattedStringExpression" - ) -> None: - pass - - @mark_no_op - def leave_FormattedStringExpression_expression( - self, node: "FormattedStringExpression" - ) -> None: - pass - - @mark_no_op - def visit_FormattedStringExpression_conversion( - self, node: "FormattedStringExpression" - ) -> None: - pass - - @mark_no_op - def leave_FormattedStringExpression_conversion( - self, node: "FormattedStringExpression" - ) -> None: - pass - - @mark_no_op - def visit_FormattedStringExpression_format_spec( - self, node: "FormattedStringExpression" - ) -> None: - pass - - @mark_no_op - def leave_FormattedStringExpression_format_spec( - self, node: "FormattedStringExpression" - ) -> None: - pass - - @mark_no_op - def visit_FormattedStringExpression_whitespace_before_expression( - self, node: "FormattedStringExpression" - ) -> None: - pass - - @mark_no_op - def leave_FormattedStringExpression_whitespace_before_expression( - self, node: "FormattedStringExpression" - ) -> None: - pass - - @mark_no_op - def visit_FormattedStringExpression_whitespace_after_expression( - self, node: "FormattedStringExpression" - ) -> None: - pass - - @mark_no_op - def leave_FormattedStringExpression_whitespace_after_expression( - self, node: "FormattedStringExpression" - ) -> None: - pass - - @mark_no_op - def visit_FormattedStringExpression_equal( - self, node: "FormattedStringExpression" - ) -> None: - pass - - @mark_no_op - def leave_FormattedStringExpression_equal( - self, node: "FormattedStringExpression" - ) -> None: - pass - - @mark_no_op - def visit_FormattedStringText(self, node: "FormattedStringText") -> Optional[bool]: - pass - - @mark_no_op - def visit_FormattedStringText_value(self, node: "FormattedStringText") -> None: - pass - - @mark_no_op - def leave_FormattedStringText_value(self, node: "FormattedStringText") -> None: - pass - - @mark_no_op - def visit_From(self, node: "From") -> Optional[bool]: - pass - - @mark_no_op - def visit_From_item(self, node: "From") -> None: - pass - - @mark_no_op - def leave_From_item(self, node: "From") -> None: - pass - - @mark_no_op - def visit_From_whitespace_before_from(self, node: "From") -> None: - pass - - @mark_no_op - def leave_From_whitespace_before_from(self, node: "From") -> None: - pass - - @mark_no_op - def visit_From_whitespace_after_from(self, node: "From") -> None: - pass - - @mark_no_op - def leave_From_whitespace_after_from(self, node: "From") -> None: - pass - - @mark_no_op - def visit_FunctionDef(self, node: "FunctionDef") -> Optional[bool]: - pass - - @mark_no_op - def visit_FunctionDef_name(self, node: "FunctionDef") -> None: - pass - - @mark_no_op - def leave_FunctionDef_name(self, node: "FunctionDef") -> None: - pass - - @mark_no_op - def visit_FunctionDef_params(self, node: "FunctionDef") -> None: - pass - - @mark_no_op - def leave_FunctionDef_params(self, node: "FunctionDef") -> None: - pass - - @mark_no_op - def visit_FunctionDef_body(self, node: "FunctionDef") -> None: - pass - - @mark_no_op - def leave_FunctionDef_body(self, node: "FunctionDef") -> None: - pass - - @mark_no_op - def visit_FunctionDef_decorators(self, node: "FunctionDef") -> None: - pass - - @mark_no_op - def leave_FunctionDef_decorators(self, node: "FunctionDef") -> None: - pass - - @mark_no_op - def visit_FunctionDef_returns(self, node: "FunctionDef") -> None: - pass - - @mark_no_op - def leave_FunctionDef_returns(self, node: "FunctionDef") -> None: - pass - - @mark_no_op - def visit_FunctionDef_asynchronous(self, node: "FunctionDef") -> None: - pass - - @mark_no_op - def leave_FunctionDef_asynchronous(self, node: "FunctionDef") -> None: - pass - - @mark_no_op - def visit_FunctionDef_leading_lines(self, node: "FunctionDef") -> None: - pass - - @mark_no_op - def leave_FunctionDef_leading_lines(self, node: "FunctionDef") -> None: - pass - - @mark_no_op - def visit_FunctionDef_lines_after_decorators(self, node: "FunctionDef") -> None: - pass - - @mark_no_op - def leave_FunctionDef_lines_after_decorators(self, node: "FunctionDef") -> None: - pass - - @mark_no_op - def visit_FunctionDef_whitespace_after_def(self, node: "FunctionDef") -> None: - pass - - @mark_no_op - def leave_FunctionDef_whitespace_after_def(self, node: "FunctionDef") -> None: - pass - - @mark_no_op - def visit_FunctionDef_whitespace_after_name(self, node: "FunctionDef") -> None: - pass - - @mark_no_op - def leave_FunctionDef_whitespace_after_name(self, node: "FunctionDef") -> None: - pass - - @mark_no_op - def visit_FunctionDef_whitespace_before_params(self, node: "FunctionDef") -> None: - pass - - @mark_no_op - def leave_FunctionDef_whitespace_before_params(self, node: "FunctionDef") -> None: - pass - - @mark_no_op - def visit_FunctionDef_whitespace_before_colon(self, node: "FunctionDef") -> None: - pass - - @mark_no_op - def leave_FunctionDef_whitespace_before_colon(self, node: "FunctionDef") -> None: - pass - - @mark_no_op - def visit_FunctionDef_type_parameters(self, node: "FunctionDef") -> None: - pass - - @mark_no_op - def leave_FunctionDef_type_parameters(self, node: "FunctionDef") -> None: - pass - - @mark_no_op - def visit_FunctionDef_whitespace_after_type_parameters( - self, node: "FunctionDef" - ) -> None: - pass - - @mark_no_op - def leave_FunctionDef_whitespace_after_type_parameters( - self, node: "FunctionDef" - ) -> None: - pass - - @mark_no_op - def visit_GeneratorExp(self, node: "GeneratorExp") -> Optional[bool]: - pass - - @mark_no_op - def visit_GeneratorExp_elt(self, node: "GeneratorExp") -> None: - pass - - @mark_no_op - def leave_GeneratorExp_elt(self, node: "GeneratorExp") -> None: - pass - - @mark_no_op - def visit_GeneratorExp_for_in(self, node: "GeneratorExp") -> None: - pass - - @mark_no_op - def leave_GeneratorExp_for_in(self, node: "GeneratorExp") -> None: - pass - - @mark_no_op - def visit_GeneratorExp_lpar(self, node: "GeneratorExp") -> None: - pass - - @mark_no_op - def leave_GeneratorExp_lpar(self, node: "GeneratorExp") -> None: - pass - - @mark_no_op - def visit_GeneratorExp_rpar(self, node: "GeneratorExp") -> None: - pass - - @mark_no_op - def leave_GeneratorExp_rpar(self, node: "GeneratorExp") -> None: - pass - - @mark_no_op - def visit_Global(self, node: "Global") -> Optional[bool]: - pass - - @mark_no_op - def visit_Global_names(self, node: "Global") -> None: - pass - - @mark_no_op - def leave_Global_names(self, node: "Global") -> None: - pass - - @mark_no_op - def visit_Global_whitespace_after_global(self, node: "Global") -> None: - pass - - @mark_no_op - def leave_Global_whitespace_after_global(self, node: "Global") -> None: - pass - - @mark_no_op - def visit_Global_semicolon(self, node: "Global") -> None: - pass - - @mark_no_op - def leave_Global_semicolon(self, node: "Global") -> None: - pass - - @mark_no_op - def visit_GreaterThan(self, node: "GreaterThan") -> Optional[bool]: - pass - - @mark_no_op - def visit_GreaterThan_whitespace_before(self, node: "GreaterThan") -> None: - pass - - @mark_no_op - def leave_GreaterThan_whitespace_before(self, node: "GreaterThan") -> None: - pass - - @mark_no_op - def visit_GreaterThan_whitespace_after(self, node: "GreaterThan") -> None: - pass - - @mark_no_op - def leave_GreaterThan_whitespace_after(self, node: "GreaterThan") -> None: - pass - - @mark_no_op - def visit_GreaterThanEqual(self, node: "GreaterThanEqual") -> Optional[bool]: - pass - - @mark_no_op - def visit_GreaterThanEqual_whitespace_before( - self, node: "GreaterThanEqual" - ) -> None: - pass - - @mark_no_op - def leave_GreaterThanEqual_whitespace_before( - self, node: "GreaterThanEqual" - ) -> None: - pass - - @mark_no_op - def visit_GreaterThanEqual_whitespace_after(self, node: "GreaterThanEqual") -> None: - pass - - @mark_no_op - def leave_GreaterThanEqual_whitespace_after(self, node: "GreaterThanEqual") -> None: - pass - - @mark_no_op - def visit_If(self, node: "If") -> Optional[bool]: - pass - - @mark_no_op - def visit_If_test(self, node: "If") -> None: - pass - - @mark_no_op - def leave_If_test(self, node: "If") -> None: - pass - - @mark_no_op - def visit_If_body(self, node: "If") -> None: - pass - - @mark_no_op - def leave_If_body(self, node: "If") -> None: - pass - - @mark_no_op - def visit_If_orelse(self, node: "If") -> None: - pass - - @mark_no_op - def leave_If_orelse(self, node: "If") -> None: - pass - - @mark_no_op - def visit_If_leading_lines(self, node: "If") -> None: - pass - - @mark_no_op - def leave_If_leading_lines(self, node: "If") -> None: - pass - - @mark_no_op - def visit_If_whitespace_before_test(self, node: "If") -> None: - pass - - @mark_no_op - def leave_If_whitespace_before_test(self, node: "If") -> None: - pass - - @mark_no_op - def visit_If_whitespace_after_test(self, node: "If") -> None: - pass - - @mark_no_op - def leave_If_whitespace_after_test(self, node: "If") -> None: - pass - - @mark_no_op - def visit_IfExp(self, node: "IfExp") -> Optional[bool]: - pass - - @mark_no_op - def visit_IfExp_test(self, node: "IfExp") -> None: - pass - - @mark_no_op - def leave_IfExp_test(self, node: "IfExp") -> None: - pass - - @mark_no_op - def visit_IfExp_body(self, node: "IfExp") -> None: - pass - - @mark_no_op - def leave_IfExp_body(self, node: "IfExp") -> None: - pass - - @mark_no_op - def visit_IfExp_orelse(self, node: "IfExp") -> None: - pass - - @mark_no_op - def leave_IfExp_orelse(self, node: "IfExp") -> None: - pass - - @mark_no_op - def visit_IfExp_lpar(self, node: "IfExp") -> None: - pass - - @mark_no_op - def leave_IfExp_lpar(self, node: "IfExp") -> None: - pass - - @mark_no_op - def visit_IfExp_rpar(self, node: "IfExp") -> None: - pass - - @mark_no_op - def leave_IfExp_rpar(self, node: "IfExp") -> None: - pass - - @mark_no_op - def visit_IfExp_whitespace_before_if(self, node: "IfExp") -> None: - pass - - @mark_no_op - def leave_IfExp_whitespace_before_if(self, node: "IfExp") -> None: - pass - - @mark_no_op - def visit_IfExp_whitespace_after_if(self, node: "IfExp") -> None: - pass - - @mark_no_op - def leave_IfExp_whitespace_after_if(self, node: "IfExp") -> None: - pass - - @mark_no_op - def visit_IfExp_whitespace_before_else(self, node: "IfExp") -> None: - pass - - @mark_no_op - def leave_IfExp_whitespace_before_else(self, node: "IfExp") -> None: - pass - - @mark_no_op - def visit_IfExp_whitespace_after_else(self, node: "IfExp") -> None: - pass - - @mark_no_op - def leave_IfExp_whitespace_after_else(self, node: "IfExp") -> None: - pass - - @mark_no_op - def visit_Imaginary(self, node: "Imaginary") -> Optional[bool]: - pass - - @mark_no_op - def visit_Imaginary_value(self, node: "Imaginary") -> None: - pass - - @mark_no_op - def leave_Imaginary_value(self, node: "Imaginary") -> None: - pass - - @mark_no_op - def visit_Imaginary_lpar(self, node: "Imaginary") -> None: - pass - - @mark_no_op - def leave_Imaginary_lpar(self, node: "Imaginary") -> None: - pass - - @mark_no_op - def visit_Imaginary_rpar(self, node: "Imaginary") -> None: - pass - - @mark_no_op - def leave_Imaginary_rpar(self, node: "Imaginary") -> None: - pass - - @mark_no_op - def visit_Import(self, node: "Import") -> Optional[bool]: - pass - - @mark_no_op - def visit_Import_names(self, node: "Import") -> None: - pass - - @mark_no_op - def leave_Import_names(self, node: "Import") -> None: - pass - - @mark_no_op - def visit_Import_semicolon(self, node: "Import") -> None: - pass - - @mark_no_op - def leave_Import_semicolon(self, node: "Import") -> None: - pass - - @mark_no_op - def visit_Import_whitespace_after_import(self, node: "Import") -> None: - pass - - @mark_no_op - def leave_Import_whitespace_after_import(self, node: "Import") -> None: - pass - - @mark_no_op - def visit_ImportAlias(self, node: "ImportAlias") -> Optional[bool]: - pass - - @mark_no_op - def visit_ImportAlias_name(self, node: "ImportAlias") -> None: - pass - - @mark_no_op - def leave_ImportAlias_name(self, node: "ImportAlias") -> None: - pass - - @mark_no_op - def visit_ImportAlias_asname(self, node: "ImportAlias") -> None: - pass - - @mark_no_op - def leave_ImportAlias_asname(self, node: "ImportAlias") -> None: - pass - - @mark_no_op - def visit_ImportAlias_comma(self, node: "ImportAlias") -> None: - pass - - @mark_no_op - def leave_ImportAlias_comma(self, node: "ImportAlias") -> None: - pass - - @mark_no_op - def visit_ImportFrom(self, node: "ImportFrom") -> Optional[bool]: - pass - - @mark_no_op - def visit_ImportFrom_module(self, node: "ImportFrom") -> None: - pass - - @mark_no_op - def leave_ImportFrom_module(self, node: "ImportFrom") -> None: - pass - - @mark_no_op - def visit_ImportFrom_names(self, node: "ImportFrom") -> None: - pass - - @mark_no_op - def leave_ImportFrom_names(self, node: "ImportFrom") -> None: - pass - - @mark_no_op - def visit_ImportFrom_relative(self, node: "ImportFrom") -> None: - pass - - @mark_no_op - def leave_ImportFrom_relative(self, node: "ImportFrom") -> None: - pass - - @mark_no_op - def visit_ImportFrom_lpar(self, node: "ImportFrom") -> None: - pass - - @mark_no_op - def leave_ImportFrom_lpar(self, node: "ImportFrom") -> None: - pass - - @mark_no_op - def visit_ImportFrom_rpar(self, node: "ImportFrom") -> None: - pass - - @mark_no_op - def leave_ImportFrom_rpar(self, node: "ImportFrom") -> None: - pass - - @mark_no_op - def visit_ImportFrom_semicolon(self, node: "ImportFrom") -> None: - pass - - @mark_no_op - def leave_ImportFrom_semicolon(self, node: "ImportFrom") -> None: - pass - - @mark_no_op - def visit_ImportFrom_whitespace_after_from(self, node: "ImportFrom") -> None: - pass - - @mark_no_op - def leave_ImportFrom_whitespace_after_from(self, node: "ImportFrom") -> None: - pass - - @mark_no_op - def visit_ImportFrom_whitespace_before_import(self, node: "ImportFrom") -> None: - pass - - @mark_no_op - def leave_ImportFrom_whitespace_before_import(self, node: "ImportFrom") -> None: - pass - - @mark_no_op - def visit_ImportFrom_whitespace_after_import(self, node: "ImportFrom") -> None: - pass - - @mark_no_op - def leave_ImportFrom_whitespace_after_import(self, node: "ImportFrom") -> None: - pass - - @mark_no_op - def visit_ImportStar(self, node: "ImportStar") -> Optional[bool]: - pass - - @mark_no_op - def visit_In(self, node: "In") -> Optional[bool]: - pass - - @mark_no_op - def visit_In_whitespace_before(self, node: "In") -> None: - pass - - @mark_no_op - def leave_In_whitespace_before(self, node: "In") -> None: - pass - - @mark_no_op - def visit_In_whitespace_after(self, node: "In") -> None: - pass - - @mark_no_op - def leave_In_whitespace_after(self, node: "In") -> None: - pass - - @mark_no_op - def visit_IndentedBlock(self, node: "IndentedBlock") -> Optional[bool]: - pass - - @mark_no_op - def visit_IndentedBlock_body(self, node: "IndentedBlock") -> None: - pass - - @mark_no_op - def leave_IndentedBlock_body(self, node: "IndentedBlock") -> None: - pass - - @mark_no_op - def visit_IndentedBlock_header(self, node: "IndentedBlock") -> None: - pass - - @mark_no_op - def leave_IndentedBlock_header(self, node: "IndentedBlock") -> None: - pass - - @mark_no_op - def visit_IndentedBlock_indent(self, node: "IndentedBlock") -> None: - pass - - @mark_no_op - def leave_IndentedBlock_indent(self, node: "IndentedBlock") -> None: - pass - - @mark_no_op - def visit_IndentedBlock_footer(self, node: "IndentedBlock") -> None: - pass - - @mark_no_op - def leave_IndentedBlock_footer(self, node: "IndentedBlock") -> None: - pass - - @mark_no_op - def visit_Index(self, node: "Index") -> Optional[bool]: - pass - - @mark_no_op - def visit_Index_value(self, node: "Index") -> None: - pass - - @mark_no_op - def leave_Index_value(self, node: "Index") -> None: - pass - - @mark_no_op - def visit_Index_star(self, node: "Index") -> None: - pass - - @mark_no_op - def leave_Index_star(self, node: "Index") -> None: - pass - - @mark_no_op - def visit_Index_whitespace_after_star(self, node: "Index") -> None: - pass - - @mark_no_op - def leave_Index_whitespace_after_star(self, node: "Index") -> None: - pass - - @mark_no_op - def visit_Integer(self, node: "Integer") -> Optional[bool]: - pass - - @mark_no_op - def visit_Integer_value(self, node: "Integer") -> None: - pass - - @mark_no_op - def leave_Integer_value(self, node: "Integer") -> None: - pass - - @mark_no_op - def visit_Integer_lpar(self, node: "Integer") -> None: - pass - - @mark_no_op - def leave_Integer_lpar(self, node: "Integer") -> None: - pass - - @mark_no_op - def visit_Integer_rpar(self, node: "Integer") -> None: - pass - - @mark_no_op - def leave_Integer_rpar(self, node: "Integer") -> None: - pass - - @mark_no_op - def visit_Is(self, node: "Is") -> Optional[bool]: - pass - - @mark_no_op - def visit_Is_whitespace_before(self, node: "Is") -> None: - pass - - @mark_no_op - def leave_Is_whitespace_before(self, node: "Is") -> None: - pass - - @mark_no_op - def visit_Is_whitespace_after(self, node: "Is") -> None: - pass - - @mark_no_op - def leave_Is_whitespace_after(self, node: "Is") -> None: - pass - - @mark_no_op - def visit_IsNot(self, node: "IsNot") -> Optional[bool]: - pass - - @mark_no_op - def visit_IsNot_whitespace_before(self, node: "IsNot") -> None: - pass - - @mark_no_op - def leave_IsNot_whitespace_before(self, node: "IsNot") -> None: - pass - - @mark_no_op - def visit_IsNot_whitespace_between(self, node: "IsNot") -> None: - pass - - @mark_no_op - def leave_IsNot_whitespace_between(self, node: "IsNot") -> None: - pass - - @mark_no_op - def visit_IsNot_whitespace_after(self, node: "IsNot") -> None: - pass - - @mark_no_op - def leave_IsNot_whitespace_after(self, node: "IsNot") -> None: - pass - - @mark_no_op - def visit_Lambda(self, node: "Lambda") -> Optional[bool]: - pass - - @mark_no_op - def visit_Lambda_params(self, node: "Lambda") -> None: - pass - - @mark_no_op - def leave_Lambda_params(self, node: "Lambda") -> None: - pass - - @mark_no_op - def visit_Lambda_body(self, node: "Lambda") -> None: - pass - - @mark_no_op - def leave_Lambda_body(self, node: "Lambda") -> None: - pass - - @mark_no_op - def visit_Lambda_colon(self, node: "Lambda") -> None: - pass - - @mark_no_op - def leave_Lambda_colon(self, node: "Lambda") -> None: - pass - - @mark_no_op - def visit_Lambda_lpar(self, node: "Lambda") -> None: - pass - - @mark_no_op - def leave_Lambda_lpar(self, node: "Lambda") -> None: - pass - - @mark_no_op - def visit_Lambda_rpar(self, node: "Lambda") -> None: - pass - - @mark_no_op - def leave_Lambda_rpar(self, node: "Lambda") -> None: - pass - - @mark_no_op - def visit_Lambda_whitespace_after_lambda(self, node: "Lambda") -> None: - pass - - @mark_no_op - def leave_Lambda_whitespace_after_lambda(self, node: "Lambda") -> None: - pass - - @mark_no_op - def visit_LeftCurlyBrace(self, node: "LeftCurlyBrace") -> Optional[bool]: - pass - - @mark_no_op - def visit_LeftCurlyBrace_whitespace_after(self, node: "LeftCurlyBrace") -> None: - pass - - @mark_no_op - def leave_LeftCurlyBrace_whitespace_after(self, node: "LeftCurlyBrace") -> None: - pass - - @mark_no_op - def visit_LeftParen(self, node: "LeftParen") -> Optional[bool]: - pass - - @mark_no_op - def visit_LeftParen_whitespace_after(self, node: "LeftParen") -> None: - pass - - @mark_no_op - def leave_LeftParen_whitespace_after(self, node: "LeftParen") -> None: - pass - - @mark_no_op - def visit_LeftShift(self, node: "LeftShift") -> Optional[bool]: - pass - - @mark_no_op - def visit_LeftShift_whitespace_before(self, node: "LeftShift") -> None: - pass - - @mark_no_op - def leave_LeftShift_whitespace_before(self, node: "LeftShift") -> None: - pass - - @mark_no_op - def visit_LeftShift_whitespace_after(self, node: "LeftShift") -> None: - pass - - @mark_no_op - def leave_LeftShift_whitespace_after(self, node: "LeftShift") -> None: - pass - - @mark_no_op - def visit_LeftShiftAssign(self, node: "LeftShiftAssign") -> Optional[bool]: - pass - - @mark_no_op - def visit_LeftShiftAssign_whitespace_before(self, node: "LeftShiftAssign") -> None: - pass - - @mark_no_op - def leave_LeftShiftAssign_whitespace_before(self, node: "LeftShiftAssign") -> None: - pass - - @mark_no_op - def visit_LeftShiftAssign_whitespace_after(self, node: "LeftShiftAssign") -> None: - pass - - @mark_no_op - def leave_LeftShiftAssign_whitespace_after(self, node: "LeftShiftAssign") -> None: - pass - - @mark_no_op - def visit_LeftSquareBracket(self, node: "LeftSquareBracket") -> Optional[bool]: - pass - - @mark_no_op - def visit_LeftSquareBracket_whitespace_after( - self, node: "LeftSquareBracket" - ) -> None: - pass - - @mark_no_op - def leave_LeftSquareBracket_whitespace_after( - self, node: "LeftSquareBracket" - ) -> None: - pass - - @mark_no_op - def visit_LessThan(self, node: "LessThan") -> Optional[bool]: - pass - - @mark_no_op - def visit_LessThan_whitespace_before(self, node: "LessThan") -> None: - pass - - @mark_no_op - def leave_LessThan_whitespace_before(self, node: "LessThan") -> None: - pass - - @mark_no_op - def visit_LessThan_whitespace_after(self, node: "LessThan") -> None: - pass - - @mark_no_op - def leave_LessThan_whitespace_after(self, node: "LessThan") -> None: - pass - - @mark_no_op - def visit_LessThanEqual(self, node: "LessThanEqual") -> Optional[bool]: - pass - - @mark_no_op - def visit_LessThanEqual_whitespace_before(self, node: "LessThanEqual") -> None: - pass - - @mark_no_op - def leave_LessThanEqual_whitespace_before(self, node: "LessThanEqual") -> None: - pass - - @mark_no_op - def visit_LessThanEqual_whitespace_after(self, node: "LessThanEqual") -> None: - pass - - @mark_no_op - def leave_LessThanEqual_whitespace_after(self, node: "LessThanEqual") -> None: - pass - - @mark_no_op - def visit_List(self, node: "List") -> Optional[bool]: - pass - - @mark_no_op - def visit_List_elements(self, node: "List") -> None: - pass - - @mark_no_op - def leave_List_elements(self, node: "List") -> None: - pass - - @mark_no_op - def visit_List_lbracket(self, node: "List") -> None: - pass - - @mark_no_op - def leave_List_lbracket(self, node: "List") -> None: - pass - - @mark_no_op - def visit_List_rbracket(self, node: "List") -> None: - pass - - @mark_no_op - def leave_List_rbracket(self, node: "List") -> None: - pass - - @mark_no_op - def visit_List_lpar(self, node: "List") -> None: - pass - - @mark_no_op - def leave_List_lpar(self, node: "List") -> None: - pass - - @mark_no_op - def visit_List_rpar(self, node: "List") -> None: - pass - - @mark_no_op - def leave_List_rpar(self, node: "List") -> None: - pass - - @mark_no_op - def visit_ListComp(self, node: "ListComp") -> Optional[bool]: - pass - - @mark_no_op - def visit_ListComp_elt(self, node: "ListComp") -> None: - pass - - @mark_no_op - def leave_ListComp_elt(self, node: "ListComp") -> None: - pass - - @mark_no_op - def visit_ListComp_for_in(self, node: "ListComp") -> None: - pass - - @mark_no_op - def leave_ListComp_for_in(self, node: "ListComp") -> None: - pass - - @mark_no_op - def visit_ListComp_lbracket(self, node: "ListComp") -> None: - pass - - @mark_no_op - def leave_ListComp_lbracket(self, node: "ListComp") -> None: - pass - - @mark_no_op - def visit_ListComp_rbracket(self, node: "ListComp") -> None: - pass - - @mark_no_op - def leave_ListComp_rbracket(self, node: "ListComp") -> None: - pass - - @mark_no_op - def visit_ListComp_lpar(self, node: "ListComp") -> None: - pass - - @mark_no_op - def leave_ListComp_lpar(self, node: "ListComp") -> None: - pass - - @mark_no_op - def visit_ListComp_rpar(self, node: "ListComp") -> None: - pass - - @mark_no_op - def leave_ListComp_rpar(self, node: "ListComp") -> None: - pass - - @mark_no_op - def visit_Match(self, node: "Match") -> Optional[bool]: - pass - - @mark_no_op - def visit_Match_subject(self, node: "Match") -> None: - pass - - @mark_no_op - def leave_Match_subject(self, node: "Match") -> None: - pass - - @mark_no_op - def visit_Match_cases(self, node: "Match") -> None: - pass - - @mark_no_op - def leave_Match_cases(self, node: "Match") -> None: - pass - - @mark_no_op - def visit_Match_leading_lines(self, node: "Match") -> None: - pass - - @mark_no_op - def leave_Match_leading_lines(self, node: "Match") -> None: - pass - - @mark_no_op - def visit_Match_whitespace_after_match(self, node: "Match") -> None: - pass - - @mark_no_op - def leave_Match_whitespace_after_match(self, node: "Match") -> None: - pass - - @mark_no_op - def visit_Match_whitespace_before_colon(self, node: "Match") -> None: - pass - - @mark_no_op - def leave_Match_whitespace_before_colon(self, node: "Match") -> None: - pass - - @mark_no_op - def visit_Match_whitespace_after_colon(self, node: "Match") -> None: - pass - - @mark_no_op - def leave_Match_whitespace_after_colon(self, node: "Match") -> None: - pass - - @mark_no_op - def visit_Match_indent(self, node: "Match") -> None: - pass - - @mark_no_op - def leave_Match_indent(self, node: "Match") -> None: - pass - - @mark_no_op - def visit_Match_footer(self, node: "Match") -> None: - pass - - @mark_no_op - def leave_Match_footer(self, node: "Match") -> None: - pass - - @mark_no_op - def visit_MatchAs(self, node: "MatchAs") -> Optional[bool]: - pass - - @mark_no_op - def visit_MatchAs_pattern(self, node: "MatchAs") -> None: - pass - - @mark_no_op - def leave_MatchAs_pattern(self, node: "MatchAs") -> None: - pass - - @mark_no_op - def visit_MatchAs_name(self, node: "MatchAs") -> None: - pass - - @mark_no_op - def leave_MatchAs_name(self, node: "MatchAs") -> None: - pass - - @mark_no_op - def visit_MatchAs_whitespace_before_as(self, node: "MatchAs") -> None: - pass - - @mark_no_op - def leave_MatchAs_whitespace_before_as(self, node: "MatchAs") -> None: - pass - - @mark_no_op - def visit_MatchAs_whitespace_after_as(self, node: "MatchAs") -> None: - pass - - @mark_no_op - def leave_MatchAs_whitespace_after_as(self, node: "MatchAs") -> None: - pass - - @mark_no_op - def visit_MatchAs_lpar(self, node: "MatchAs") -> None: - pass - - @mark_no_op - def leave_MatchAs_lpar(self, node: "MatchAs") -> None: - pass - - @mark_no_op - def visit_MatchAs_rpar(self, node: "MatchAs") -> None: - pass - - @mark_no_op - def leave_MatchAs_rpar(self, node: "MatchAs") -> None: - pass - - @mark_no_op - def visit_MatchCase(self, node: "MatchCase") -> Optional[bool]: - pass - - @mark_no_op - def visit_MatchCase_pattern(self, node: "MatchCase") -> None: - pass - - @mark_no_op - def leave_MatchCase_pattern(self, node: "MatchCase") -> None: - pass - - @mark_no_op - def visit_MatchCase_body(self, node: "MatchCase") -> None: - pass - - @mark_no_op - def leave_MatchCase_body(self, node: "MatchCase") -> None: - pass - - @mark_no_op - def visit_MatchCase_guard(self, node: "MatchCase") -> None: - pass - - @mark_no_op - def leave_MatchCase_guard(self, node: "MatchCase") -> None: - pass - - @mark_no_op - def visit_MatchCase_leading_lines(self, node: "MatchCase") -> None: - pass - - @mark_no_op - def leave_MatchCase_leading_lines(self, node: "MatchCase") -> None: - pass - - @mark_no_op - def visit_MatchCase_whitespace_after_case(self, node: "MatchCase") -> None: - pass - - @mark_no_op - def leave_MatchCase_whitespace_after_case(self, node: "MatchCase") -> None: - pass - - @mark_no_op - def visit_MatchCase_whitespace_before_if(self, node: "MatchCase") -> None: - pass - - @mark_no_op - def leave_MatchCase_whitespace_before_if(self, node: "MatchCase") -> None: - pass - - @mark_no_op - def visit_MatchCase_whitespace_after_if(self, node: "MatchCase") -> None: - pass - - @mark_no_op - def leave_MatchCase_whitespace_after_if(self, node: "MatchCase") -> None: - pass - - @mark_no_op - def visit_MatchCase_whitespace_before_colon(self, node: "MatchCase") -> None: - pass - - @mark_no_op - def leave_MatchCase_whitespace_before_colon(self, node: "MatchCase") -> None: - pass - - @mark_no_op - def visit_MatchClass(self, node: "MatchClass") -> Optional[bool]: - pass - - @mark_no_op - def visit_MatchClass_cls(self, node: "MatchClass") -> None: - pass - - @mark_no_op - def leave_MatchClass_cls(self, node: "MatchClass") -> None: - pass - - @mark_no_op - def visit_MatchClass_patterns(self, node: "MatchClass") -> None: - pass - - @mark_no_op - def leave_MatchClass_patterns(self, node: "MatchClass") -> None: - pass - - @mark_no_op - def visit_MatchClass_kwds(self, node: "MatchClass") -> None: - pass - - @mark_no_op - def leave_MatchClass_kwds(self, node: "MatchClass") -> None: - pass - - @mark_no_op - def visit_MatchClass_whitespace_after_cls(self, node: "MatchClass") -> None: - pass - - @mark_no_op - def leave_MatchClass_whitespace_after_cls(self, node: "MatchClass") -> None: - pass - - @mark_no_op - def visit_MatchClass_whitespace_before_patterns(self, node: "MatchClass") -> None: - pass - - @mark_no_op - def leave_MatchClass_whitespace_before_patterns(self, node: "MatchClass") -> None: - pass - - @mark_no_op - def visit_MatchClass_whitespace_after_kwds(self, node: "MatchClass") -> None: - pass - - @mark_no_op - def leave_MatchClass_whitespace_after_kwds(self, node: "MatchClass") -> None: - pass - - @mark_no_op - def visit_MatchClass_lpar(self, node: "MatchClass") -> None: - pass - - @mark_no_op - def leave_MatchClass_lpar(self, node: "MatchClass") -> None: - pass - - @mark_no_op - def visit_MatchClass_rpar(self, node: "MatchClass") -> None: - pass - - @mark_no_op - def leave_MatchClass_rpar(self, node: "MatchClass") -> None: - pass - - @mark_no_op - def visit_MatchKeywordElement(self, node: "MatchKeywordElement") -> Optional[bool]: - pass - - @mark_no_op - def visit_MatchKeywordElement_key(self, node: "MatchKeywordElement") -> None: - pass - - @mark_no_op - def leave_MatchKeywordElement_key(self, node: "MatchKeywordElement") -> None: - pass - - @mark_no_op - def visit_MatchKeywordElement_pattern(self, node: "MatchKeywordElement") -> None: - pass - - @mark_no_op - def leave_MatchKeywordElement_pattern(self, node: "MatchKeywordElement") -> None: - pass - - @mark_no_op - def visit_MatchKeywordElement_comma(self, node: "MatchKeywordElement") -> None: - pass - - @mark_no_op - def leave_MatchKeywordElement_comma(self, node: "MatchKeywordElement") -> None: - pass - - @mark_no_op - def visit_MatchKeywordElement_whitespace_before_equal( - self, node: "MatchKeywordElement" - ) -> None: - pass - - @mark_no_op - def leave_MatchKeywordElement_whitespace_before_equal( - self, node: "MatchKeywordElement" - ) -> None: - pass - - @mark_no_op - def visit_MatchKeywordElement_whitespace_after_equal( - self, node: "MatchKeywordElement" - ) -> None: - pass - - @mark_no_op - def leave_MatchKeywordElement_whitespace_after_equal( - self, node: "MatchKeywordElement" - ) -> None: - pass - - @mark_no_op - def visit_MatchList(self, node: "MatchList") -> Optional[bool]: - pass - - @mark_no_op - def visit_MatchList_patterns(self, node: "MatchList") -> None: - pass - - @mark_no_op - def leave_MatchList_patterns(self, node: "MatchList") -> None: - pass - - @mark_no_op - def visit_MatchList_lbracket(self, node: "MatchList") -> None: - pass - - @mark_no_op - def leave_MatchList_lbracket(self, node: "MatchList") -> None: - pass - - @mark_no_op - def visit_MatchList_rbracket(self, node: "MatchList") -> None: - pass - - @mark_no_op - def leave_MatchList_rbracket(self, node: "MatchList") -> None: - pass - - @mark_no_op - def visit_MatchList_lpar(self, node: "MatchList") -> None: - pass - - @mark_no_op - def leave_MatchList_lpar(self, node: "MatchList") -> None: - pass - - @mark_no_op - def visit_MatchList_rpar(self, node: "MatchList") -> None: - pass - - @mark_no_op - def leave_MatchList_rpar(self, node: "MatchList") -> None: - pass - - @mark_no_op - def visit_MatchMapping(self, node: "MatchMapping") -> Optional[bool]: - pass - - @mark_no_op - def visit_MatchMapping_elements(self, node: "MatchMapping") -> None: - pass - - @mark_no_op - def leave_MatchMapping_elements(self, node: "MatchMapping") -> None: - pass - - @mark_no_op - def visit_MatchMapping_lbrace(self, node: "MatchMapping") -> None: - pass - - @mark_no_op - def leave_MatchMapping_lbrace(self, node: "MatchMapping") -> None: - pass - - @mark_no_op - def visit_MatchMapping_rbrace(self, node: "MatchMapping") -> None: - pass - - @mark_no_op - def leave_MatchMapping_rbrace(self, node: "MatchMapping") -> None: - pass - - @mark_no_op - def visit_MatchMapping_rest(self, node: "MatchMapping") -> None: - pass - - @mark_no_op - def leave_MatchMapping_rest(self, node: "MatchMapping") -> None: - pass - - @mark_no_op - def visit_MatchMapping_whitespace_before_rest(self, node: "MatchMapping") -> None: - pass - - @mark_no_op - def leave_MatchMapping_whitespace_before_rest(self, node: "MatchMapping") -> None: - pass - - @mark_no_op - def visit_MatchMapping_trailing_comma(self, node: "MatchMapping") -> None: - pass - - @mark_no_op - def leave_MatchMapping_trailing_comma(self, node: "MatchMapping") -> None: - pass - - @mark_no_op - def visit_MatchMapping_lpar(self, node: "MatchMapping") -> None: - pass - - @mark_no_op - def leave_MatchMapping_lpar(self, node: "MatchMapping") -> None: - pass - - @mark_no_op - def visit_MatchMapping_rpar(self, node: "MatchMapping") -> None: - pass - - @mark_no_op - def leave_MatchMapping_rpar(self, node: "MatchMapping") -> None: - pass - - @mark_no_op - def visit_MatchMappingElement(self, node: "MatchMappingElement") -> Optional[bool]: - pass - - @mark_no_op - def visit_MatchMappingElement_key(self, node: "MatchMappingElement") -> None: - pass - - @mark_no_op - def leave_MatchMappingElement_key(self, node: "MatchMappingElement") -> None: - pass - - @mark_no_op - def visit_MatchMappingElement_pattern(self, node: "MatchMappingElement") -> None: - pass - - @mark_no_op - def leave_MatchMappingElement_pattern(self, node: "MatchMappingElement") -> None: - pass - - @mark_no_op - def visit_MatchMappingElement_comma(self, node: "MatchMappingElement") -> None: - pass - - @mark_no_op - def leave_MatchMappingElement_comma(self, node: "MatchMappingElement") -> None: - pass - - @mark_no_op - def visit_MatchMappingElement_whitespace_before_colon( - self, node: "MatchMappingElement" - ) -> None: - pass - - @mark_no_op - def leave_MatchMappingElement_whitespace_before_colon( - self, node: "MatchMappingElement" - ) -> None: - pass - - @mark_no_op - def visit_MatchMappingElement_whitespace_after_colon( - self, node: "MatchMappingElement" - ) -> None: - pass - - @mark_no_op - def leave_MatchMappingElement_whitespace_after_colon( - self, node: "MatchMappingElement" - ) -> None: - pass - - @mark_no_op - def visit_MatchOr(self, node: "MatchOr") -> Optional[bool]: - pass - - @mark_no_op - def visit_MatchOr_patterns(self, node: "MatchOr") -> None: - pass - - @mark_no_op - def leave_MatchOr_patterns(self, node: "MatchOr") -> None: - pass - - @mark_no_op - def visit_MatchOr_lpar(self, node: "MatchOr") -> None: - pass - - @mark_no_op - def leave_MatchOr_lpar(self, node: "MatchOr") -> None: - pass - - @mark_no_op - def visit_MatchOr_rpar(self, node: "MatchOr") -> None: - pass - - @mark_no_op - def leave_MatchOr_rpar(self, node: "MatchOr") -> None: - pass - - @mark_no_op - def visit_MatchOrElement(self, node: "MatchOrElement") -> Optional[bool]: - pass - - @mark_no_op - def visit_MatchOrElement_pattern(self, node: "MatchOrElement") -> None: - pass - - @mark_no_op - def leave_MatchOrElement_pattern(self, node: "MatchOrElement") -> None: - pass - - @mark_no_op - def visit_MatchOrElement_separator(self, node: "MatchOrElement") -> None: - pass - - @mark_no_op - def leave_MatchOrElement_separator(self, node: "MatchOrElement") -> None: - pass - - @mark_no_op - def visit_MatchPattern(self, node: "MatchPattern") -> Optional[bool]: - pass - - @mark_no_op - def visit_MatchSequence(self, node: "MatchSequence") -> Optional[bool]: - pass - - @mark_no_op - def visit_MatchSequenceElement( - self, node: "MatchSequenceElement" - ) -> Optional[bool]: - pass - - @mark_no_op - def visit_MatchSequenceElement_value(self, node: "MatchSequenceElement") -> None: - pass - - @mark_no_op - def leave_MatchSequenceElement_value(self, node: "MatchSequenceElement") -> None: - pass - - @mark_no_op - def visit_MatchSequenceElement_comma(self, node: "MatchSequenceElement") -> None: - pass - - @mark_no_op - def leave_MatchSequenceElement_comma(self, node: "MatchSequenceElement") -> None: - pass - - @mark_no_op - def visit_MatchSingleton(self, node: "MatchSingleton") -> Optional[bool]: - pass - - @mark_no_op - def visit_MatchSingleton_value(self, node: "MatchSingleton") -> None: - pass - - @mark_no_op - def leave_MatchSingleton_value(self, node: "MatchSingleton") -> None: - pass - - @mark_no_op - def visit_MatchStar(self, node: "MatchStar") -> Optional[bool]: - pass - - @mark_no_op - def visit_MatchStar_name(self, node: "MatchStar") -> None: - pass - - @mark_no_op - def leave_MatchStar_name(self, node: "MatchStar") -> None: - pass - - @mark_no_op - def visit_MatchStar_comma(self, node: "MatchStar") -> None: - pass - - @mark_no_op - def leave_MatchStar_comma(self, node: "MatchStar") -> None: - pass - - @mark_no_op - def visit_MatchStar_whitespace_before_name(self, node: "MatchStar") -> None: - pass - - @mark_no_op - def leave_MatchStar_whitespace_before_name(self, node: "MatchStar") -> None: - pass - - @mark_no_op - def visit_MatchTuple(self, node: "MatchTuple") -> Optional[bool]: - pass - - @mark_no_op - def visit_MatchTuple_patterns(self, node: "MatchTuple") -> None: - pass - - @mark_no_op - def leave_MatchTuple_patterns(self, node: "MatchTuple") -> None: - pass - - @mark_no_op - def visit_MatchTuple_lpar(self, node: "MatchTuple") -> None: - pass - - @mark_no_op - def leave_MatchTuple_lpar(self, node: "MatchTuple") -> None: - pass - - @mark_no_op - def visit_MatchTuple_rpar(self, node: "MatchTuple") -> None: - pass - - @mark_no_op - def leave_MatchTuple_rpar(self, node: "MatchTuple") -> None: - pass - - @mark_no_op - def visit_MatchValue(self, node: "MatchValue") -> Optional[bool]: - pass - - @mark_no_op - def visit_MatchValue_value(self, node: "MatchValue") -> None: - pass - - @mark_no_op - def leave_MatchValue_value(self, node: "MatchValue") -> None: - pass - - @mark_no_op - def visit_MatrixMultiply(self, node: "MatrixMultiply") -> Optional[bool]: - pass - - @mark_no_op - def visit_MatrixMultiply_whitespace_before(self, node: "MatrixMultiply") -> None: - pass - - @mark_no_op - def leave_MatrixMultiply_whitespace_before(self, node: "MatrixMultiply") -> None: - pass - - @mark_no_op - def visit_MatrixMultiply_whitespace_after(self, node: "MatrixMultiply") -> None: - pass - - @mark_no_op - def leave_MatrixMultiply_whitespace_after(self, node: "MatrixMultiply") -> None: - pass - - @mark_no_op - def visit_MatrixMultiplyAssign( - self, node: "MatrixMultiplyAssign" - ) -> Optional[bool]: - pass - - @mark_no_op - def visit_MatrixMultiplyAssign_whitespace_before( - self, node: "MatrixMultiplyAssign" - ) -> None: - pass - - @mark_no_op - def leave_MatrixMultiplyAssign_whitespace_before( - self, node: "MatrixMultiplyAssign" - ) -> None: - pass - - @mark_no_op - def visit_MatrixMultiplyAssign_whitespace_after( - self, node: "MatrixMultiplyAssign" - ) -> None: - pass - - @mark_no_op - def leave_MatrixMultiplyAssign_whitespace_after( - self, node: "MatrixMultiplyAssign" - ) -> None: - pass - - @mark_no_op - def visit_Minus(self, node: "Minus") -> Optional[bool]: - pass - - @mark_no_op - def visit_Minus_whitespace_after(self, node: "Minus") -> None: - pass - - @mark_no_op - def leave_Minus_whitespace_after(self, node: "Minus") -> None: - pass - - @mark_no_op - def visit_Module(self, node: "Module") -> Optional[bool]: - pass - - @mark_no_op - def visit_Module_body(self, node: "Module") -> None: - pass - - @mark_no_op - def leave_Module_body(self, node: "Module") -> None: - pass - - @mark_no_op - def visit_Module_header(self, node: "Module") -> None: - pass - - @mark_no_op - def leave_Module_header(self, node: "Module") -> None: - pass - - @mark_no_op - def visit_Module_footer(self, node: "Module") -> None: - pass - - @mark_no_op - def leave_Module_footer(self, node: "Module") -> None: - pass - - @mark_no_op - def visit_Module_encoding(self, node: "Module") -> None: - pass - - @mark_no_op - def leave_Module_encoding(self, node: "Module") -> None: - pass - - @mark_no_op - def visit_Module_default_indent(self, node: "Module") -> None: - pass - - @mark_no_op - def leave_Module_default_indent(self, node: "Module") -> None: - pass - - @mark_no_op - def visit_Module_default_newline(self, node: "Module") -> None: - pass - - @mark_no_op - def leave_Module_default_newline(self, node: "Module") -> None: - pass - - @mark_no_op - def visit_Module_has_trailing_newline(self, node: "Module") -> None: - pass - - @mark_no_op - def leave_Module_has_trailing_newline(self, node: "Module") -> None: - pass - - @mark_no_op - def visit_Modulo(self, node: "Modulo") -> Optional[bool]: - pass - - @mark_no_op - def visit_Modulo_whitespace_before(self, node: "Modulo") -> None: - pass - - @mark_no_op - def leave_Modulo_whitespace_before(self, node: "Modulo") -> None: - pass - - @mark_no_op - def visit_Modulo_whitespace_after(self, node: "Modulo") -> None: - pass - - @mark_no_op - def leave_Modulo_whitespace_after(self, node: "Modulo") -> None: - pass - - @mark_no_op - def visit_ModuloAssign(self, node: "ModuloAssign") -> Optional[bool]: - pass - - @mark_no_op - def visit_ModuloAssign_whitespace_before(self, node: "ModuloAssign") -> None: - pass - - @mark_no_op - def leave_ModuloAssign_whitespace_before(self, node: "ModuloAssign") -> None: - pass - - @mark_no_op - def visit_ModuloAssign_whitespace_after(self, node: "ModuloAssign") -> None: - pass - - @mark_no_op - def leave_ModuloAssign_whitespace_after(self, node: "ModuloAssign") -> None: - pass - - @mark_no_op - def visit_Multiply(self, node: "Multiply") -> Optional[bool]: - pass - - @mark_no_op - def visit_Multiply_whitespace_before(self, node: "Multiply") -> None: - pass - - @mark_no_op - def leave_Multiply_whitespace_before(self, node: "Multiply") -> None: - pass - - @mark_no_op - def visit_Multiply_whitespace_after(self, node: "Multiply") -> None: - pass - - @mark_no_op - def leave_Multiply_whitespace_after(self, node: "Multiply") -> None: - pass - - @mark_no_op - def visit_MultiplyAssign(self, node: "MultiplyAssign") -> Optional[bool]: - pass - - @mark_no_op - def visit_MultiplyAssign_whitespace_before(self, node: "MultiplyAssign") -> None: - pass - - @mark_no_op - def leave_MultiplyAssign_whitespace_before(self, node: "MultiplyAssign") -> None: - pass - - @mark_no_op - def visit_MultiplyAssign_whitespace_after(self, node: "MultiplyAssign") -> None: - pass - - @mark_no_op - def leave_MultiplyAssign_whitespace_after(self, node: "MultiplyAssign") -> None: - pass - - @mark_no_op - def visit_Name(self, node: "Name") -> Optional[bool]: - pass - - @mark_no_op - def visit_Name_value(self, node: "Name") -> None: - pass - - @mark_no_op - def leave_Name_value(self, node: "Name") -> None: - pass - - @mark_no_op - def visit_Name_lpar(self, node: "Name") -> None: - pass - - @mark_no_op - def leave_Name_lpar(self, node: "Name") -> None: - pass - - @mark_no_op - def visit_Name_rpar(self, node: "Name") -> None: - pass - - @mark_no_op - def leave_Name_rpar(self, node: "Name") -> None: - pass - - @mark_no_op - def visit_NameItem(self, node: "NameItem") -> Optional[bool]: - pass - - @mark_no_op - def visit_NameItem_name(self, node: "NameItem") -> None: - pass - - @mark_no_op - def leave_NameItem_name(self, node: "NameItem") -> None: - pass - - @mark_no_op - def visit_NameItem_comma(self, node: "NameItem") -> None: - pass - - @mark_no_op - def leave_NameItem_comma(self, node: "NameItem") -> None: - pass - - @mark_no_op - def visit_NamedExpr(self, node: "NamedExpr") -> Optional[bool]: - pass - - @mark_no_op - def visit_NamedExpr_target(self, node: "NamedExpr") -> None: - pass - - @mark_no_op - def leave_NamedExpr_target(self, node: "NamedExpr") -> None: - pass - - @mark_no_op - def visit_NamedExpr_value(self, node: "NamedExpr") -> None: - pass - - @mark_no_op - def leave_NamedExpr_value(self, node: "NamedExpr") -> None: - pass - - @mark_no_op - def visit_NamedExpr_lpar(self, node: "NamedExpr") -> None: - pass - - @mark_no_op - def leave_NamedExpr_lpar(self, node: "NamedExpr") -> None: - pass - - @mark_no_op - def visit_NamedExpr_rpar(self, node: "NamedExpr") -> None: - pass - - @mark_no_op - def leave_NamedExpr_rpar(self, node: "NamedExpr") -> None: - pass - - @mark_no_op - def visit_NamedExpr_whitespace_before_walrus(self, node: "NamedExpr") -> None: - pass - - @mark_no_op - def leave_NamedExpr_whitespace_before_walrus(self, node: "NamedExpr") -> None: - pass - - @mark_no_op - def visit_NamedExpr_whitespace_after_walrus(self, node: "NamedExpr") -> None: - pass - - @mark_no_op - def leave_NamedExpr_whitespace_after_walrus(self, node: "NamedExpr") -> None: - pass - - @mark_no_op - def visit_Newline(self, node: "Newline") -> Optional[bool]: - pass - - @mark_no_op - def visit_Newline_value(self, node: "Newline") -> None: - pass - - @mark_no_op - def leave_Newline_value(self, node: "Newline") -> None: - pass - - @mark_no_op - def visit_Nonlocal(self, node: "Nonlocal") -> Optional[bool]: - pass - - @mark_no_op - def visit_Nonlocal_names(self, node: "Nonlocal") -> None: - pass - - @mark_no_op - def leave_Nonlocal_names(self, node: "Nonlocal") -> None: - pass - - @mark_no_op - def visit_Nonlocal_whitespace_after_nonlocal(self, node: "Nonlocal") -> None: - pass - - @mark_no_op - def leave_Nonlocal_whitespace_after_nonlocal(self, node: "Nonlocal") -> None: - pass - - @mark_no_op - def visit_Nonlocal_semicolon(self, node: "Nonlocal") -> None: - pass - - @mark_no_op - def leave_Nonlocal_semicolon(self, node: "Nonlocal") -> None: - pass - - @mark_no_op - def visit_Not(self, node: "Not") -> Optional[bool]: - pass - - @mark_no_op - def visit_Not_whitespace_after(self, node: "Not") -> None: - pass - - @mark_no_op - def leave_Not_whitespace_after(self, node: "Not") -> None: - pass - - @mark_no_op - def visit_NotEqual(self, node: "NotEqual") -> Optional[bool]: - pass - - @mark_no_op - def visit_NotEqual_value(self, node: "NotEqual") -> None: - pass - - @mark_no_op - def leave_NotEqual_value(self, node: "NotEqual") -> None: - pass - - @mark_no_op - def visit_NotEqual_whitespace_before(self, node: "NotEqual") -> None: - pass - - @mark_no_op - def leave_NotEqual_whitespace_before(self, node: "NotEqual") -> None: - pass - - @mark_no_op - def visit_NotEqual_whitespace_after(self, node: "NotEqual") -> None: - pass - - @mark_no_op - def leave_NotEqual_whitespace_after(self, node: "NotEqual") -> None: - pass - - @mark_no_op - def visit_NotIn(self, node: "NotIn") -> Optional[bool]: - pass - - @mark_no_op - def visit_NotIn_whitespace_before(self, node: "NotIn") -> None: - pass - - @mark_no_op - def leave_NotIn_whitespace_before(self, node: "NotIn") -> None: - pass - - @mark_no_op - def visit_NotIn_whitespace_between(self, node: "NotIn") -> None: - pass - - @mark_no_op - def leave_NotIn_whitespace_between(self, node: "NotIn") -> None: - pass - - @mark_no_op - def visit_NotIn_whitespace_after(self, node: "NotIn") -> None: - pass - - @mark_no_op - def leave_NotIn_whitespace_after(self, node: "NotIn") -> None: - pass - - @mark_no_op - def visit_Or(self, node: "Or") -> Optional[bool]: - pass - - @mark_no_op - def visit_Or_whitespace_before(self, node: "Or") -> None: - pass - - @mark_no_op - def leave_Or_whitespace_before(self, node: "Or") -> None: - pass - - @mark_no_op - def visit_Or_whitespace_after(self, node: "Or") -> None: - pass - - @mark_no_op - def leave_Or_whitespace_after(self, node: "Or") -> None: - pass - - @mark_no_op - def visit_Param(self, node: "Param") -> Optional[bool]: - pass - - @mark_no_op - def visit_Param_name(self, node: "Param") -> None: - pass - - @mark_no_op - def leave_Param_name(self, node: "Param") -> None: - pass - - @mark_no_op - def visit_Param_annotation(self, node: "Param") -> None: - pass - - @mark_no_op - def leave_Param_annotation(self, node: "Param") -> None: - pass - - @mark_no_op - def visit_Param_equal(self, node: "Param") -> None: - pass - - @mark_no_op - def leave_Param_equal(self, node: "Param") -> None: - pass - - @mark_no_op - def visit_Param_default(self, node: "Param") -> None: - pass - - @mark_no_op - def leave_Param_default(self, node: "Param") -> None: - pass - - @mark_no_op - def visit_Param_comma(self, node: "Param") -> None: - pass - - @mark_no_op - def leave_Param_comma(self, node: "Param") -> None: - pass - - @mark_no_op - def visit_Param_star(self, node: "Param") -> None: - pass - - @mark_no_op - def leave_Param_star(self, node: "Param") -> None: - pass - - @mark_no_op - def visit_Param_whitespace_after_star(self, node: "Param") -> None: - pass - - @mark_no_op - def leave_Param_whitespace_after_star(self, node: "Param") -> None: - pass - - @mark_no_op - def visit_Param_whitespace_after_param(self, node: "Param") -> None: - pass - - @mark_no_op - def leave_Param_whitespace_after_param(self, node: "Param") -> None: - pass - - @mark_no_op - def visit_ParamSlash(self, node: "ParamSlash") -> Optional[bool]: - pass - - @mark_no_op - def visit_ParamSlash_comma(self, node: "ParamSlash") -> None: - pass - - @mark_no_op - def leave_ParamSlash_comma(self, node: "ParamSlash") -> None: - pass - - @mark_no_op - def visit_ParamSlash_whitespace_after(self, node: "ParamSlash") -> None: - pass - - @mark_no_op - def leave_ParamSlash_whitespace_after(self, node: "ParamSlash") -> None: - pass - - @mark_no_op - def visit_ParamSpec(self, node: "ParamSpec") -> Optional[bool]: - pass - - @mark_no_op - def visit_ParamSpec_name(self, node: "ParamSpec") -> None: - pass - - @mark_no_op - def leave_ParamSpec_name(self, node: "ParamSpec") -> None: - pass - - @mark_no_op - def visit_ParamSpec_whitespace_after_star(self, node: "ParamSpec") -> None: - pass - - @mark_no_op - def leave_ParamSpec_whitespace_after_star(self, node: "ParamSpec") -> None: - pass - - @mark_no_op - def visit_ParamStar(self, node: "ParamStar") -> Optional[bool]: - pass - - @mark_no_op - def visit_ParamStar_comma(self, node: "ParamStar") -> None: - pass - - @mark_no_op - def leave_ParamStar_comma(self, node: "ParamStar") -> None: - pass - - @mark_no_op - def visit_Parameters(self, node: "Parameters") -> Optional[bool]: - pass - - @mark_no_op - def visit_Parameters_params(self, node: "Parameters") -> None: - pass - - @mark_no_op - def leave_Parameters_params(self, node: "Parameters") -> None: - pass - - @mark_no_op - def visit_Parameters_star_arg(self, node: "Parameters") -> None: - pass - - @mark_no_op - def leave_Parameters_star_arg(self, node: "Parameters") -> None: - pass - - @mark_no_op - def visit_Parameters_kwonly_params(self, node: "Parameters") -> None: - pass - - @mark_no_op - def leave_Parameters_kwonly_params(self, node: "Parameters") -> None: - pass - - @mark_no_op - def visit_Parameters_star_kwarg(self, node: "Parameters") -> None: - pass - - @mark_no_op - def leave_Parameters_star_kwarg(self, node: "Parameters") -> None: - pass - - @mark_no_op - def visit_Parameters_posonly_params(self, node: "Parameters") -> None: - pass - - @mark_no_op - def leave_Parameters_posonly_params(self, node: "Parameters") -> None: - pass - - @mark_no_op - def visit_Parameters_posonly_ind(self, node: "Parameters") -> None: - pass - - @mark_no_op - def leave_Parameters_posonly_ind(self, node: "Parameters") -> None: - pass - - @mark_no_op - def visit_ParenthesizedWhitespace( - self, node: "ParenthesizedWhitespace" - ) -> Optional[bool]: - pass - - @mark_no_op - def visit_ParenthesizedWhitespace_first_line( - self, node: "ParenthesizedWhitespace" - ) -> None: - pass - - @mark_no_op - def leave_ParenthesizedWhitespace_first_line( - self, node: "ParenthesizedWhitespace" - ) -> None: - pass - - @mark_no_op - def visit_ParenthesizedWhitespace_empty_lines( - self, node: "ParenthesizedWhitespace" - ) -> None: - pass - - @mark_no_op - def leave_ParenthesizedWhitespace_empty_lines( - self, node: "ParenthesizedWhitespace" - ) -> None: - pass - - @mark_no_op - def visit_ParenthesizedWhitespace_indent( - self, node: "ParenthesizedWhitespace" - ) -> None: - pass - - @mark_no_op - def leave_ParenthesizedWhitespace_indent( - self, node: "ParenthesizedWhitespace" - ) -> None: - pass - - @mark_no_op - def visit_ParenthesizedWhitespace_last_line( - self, node: "ParenthesizedWhitespace" - ) -> None: - pass - - @mark_no_op - def leave_ParenthesizedWhitespace_last_line( - self, node: "ParenthesizedWhitespace" - ) -> None: - pass - - @mark_no_op - def visit_Pass(self, node: "Pass") -> Optional[bool]: - pass - - @mark_no_op - def visit_Pass_semicolon(self, node: "Pass") -> None: - pass - - @mark_no_op - def leave_Pass_semicolon(self, node: "Pass") -> None: - pass - - @mark_no_op - def visit_Plus(self, node: "Plus") -> Optional[bool]: - pass - - @mark_no_op - def visit_Plus_whitespace_after(self, node: "Plus") -> None: - pass - - @mark_no_op - def leave_Plus_whitespace_after(self, node: "Plus") -> None: - pass - - @mark_no_op - def visit_Power(self, node: "Power") -> Optional[bool]: - pass - - @mark_no_op - def visit_Power_whitespace_before(self, node: "Power") -> None: - pass - - @mark_no_op - def leave_Power_whitespace_before(self, node: "Power") -> None: - pass - - @mark_no_op - def visit_Power_whitespace_after(self, node: "Power") -> None: - pass - - @mark_no_op - def leave_Power_whitespace_after(self, node: "Power") -> None: - pass - - @mark_no_op - def visit_PowerAssign(self, node: "PowerAssign") -> Optional[bool]: - pass - - @mark_no_op - def visit_PowerAssign_whitespace_before(self, node: "PowerAssign") -> None: - pass - - @mark_no_op - def leave_PowerAssign_whitespace_before(self, node: "PowerAssign") -> None: - pass - - @mark_no_op - def visit_PowerAssign_whitespace_after(self, node: "PowerAssign") -> None: - pass - - @mark_no_op - def leave_PowerAssign_whitespace_after(self, node: "PowerAssign") -> None: - pass - - @mark_no_op - def visit_Raise(self, node: "Raise") -> Optional[bool]: - pass - - @mark_no_op - def visit_Raise_exc(self, node: "Raise") -> None: - pass - - @mark_no_op - def leave_Raise_exc(self, node: "Raise") -> None: - pass - - @mark_no_op - def visit_Raise_cause(self, node: "Raise") -> None: - pass - - @mark_no_op - def leave_Raise_cause(self, node: "Raise") -> None: - pass - - @mark_no_op - def visit_Raise_whitespace_after_raise(self, node: "Raise") -> None: - pass - - @mark_no_op - def leave_Raise_whitespace_after_raise(self, node: "Raise") -> None: - pass - - @mark_no_op - def visit_Raise_semicolon(self, node: "Raise") -> None: - pass - - @mark_no_op - def leave_Raise_semicolon(self, node: "Raise") -> None: - pass - - @mark_no_op - def visit_Return(self, node: "Return") -> Optional[bool]: - pass - - @mark_no_op - def visit_Return_value(self, node: "Return") -> None: - pass - - @mark_no_op - def leave_Return_value(self, node: "Return") -> None: - pass - - @mark_no_op - def visit_Return_whitespace_after_return(self, node: "Return") -> None: - pass - - @mark_no_op - def leave_Return_whitespace_after_return(self, node: "Return") -> None: - pass - - @mark_no_op - def visit_Return_semicolon(self, node: "Return") -> None: - pass - - @mark_no_op - def leave_Return_semicolon(self, node: "Return") -> None: - pass - - @mark_no_op - def visit_RightCurlyBrace(self, node: "RightCurlyBrace") -> Optional[bool]: - pass - - @mark_no_op - def visit_RightCurlyBrace_whitespace_before(self, node: "RightCurlyBrace") -> None: - pass - - @mark_no_op - def leave_RightCurlyBrace_whitespace_before(self, node: "RightCurlyBrace") -> None: - pass - - @mark_no_op - def visit_RightParen(self, node: "RightParen") -> Optional[bool]: - pass - - @mark_no_op - def visit_RightParen_whitespace_before(self, node: "RightParen") -> None: - pass - - @mark_no_op - def leave_RightParen_whitespace_before(self, node: "RightParen") -> None: - pass - - @mark_no_op - def visit_RightShift(self, node: "RightShift") -> Optional[bool]: - pass - - @mark_no_op - def visit_RightShift_whitespace_before(self, node: "RightShift") -> None: - pass - - @mark_no_op - def leave_RightShift_whitespace_before(self, node: "RightShift") -> None: - pass - - @mark_no_op - def visit_RightShift_whitespace_after(self, node: "RightShift") -> None: - pass - - @mark_no_op - def leave_RightShift_whitespace_after(self, node: "RightShift") -> None: - pass - - @mark_no_op - def visit_RightShiftAssign(self, node: "RightShiftAssign") -> Optional[bool]: - pass - - @mark_no_op - def visit_RightShiftAssign_whitespace_before( - self, node: "RightShiftAssign" - ) -> None: - pass - - @mark_no_op - def leave_RightShiftAssign_whitespace_before( - self, node: "RightShiftAssign" - ) -> None: - pass - - @mark_no_op - def visit_RightShiftAssign_whitespace_after(self, node: "RightShiftAssign") -> None: - pass - - @mark_no_op - def leave_RightShiftAssign_whitespace_after(self, node: "RightShiftAssign") -> None: - pass - - @mark_no_op - def visit_RightSquareBracket(self, node: "RightSquareBracket") -> Optional[bool]: - pass - - @mark_no_op - def visit_RightSquareBracket_whitespace_before( - self, node: "RightSquareBracket" - ) -> None: - pass - - @mark_no_op - def leave_RightSquareBracket_whitespace_before( - self, node: "RightSquareBracket" - ) -> None: - pass - - @mark_no_op - def visit_Semicolon(self, node: "Semicolon") -> Optional[bool]: - pass - - @mark_no_op - def visit_Semicolon_whitespace_before(self, node: "Semicolon") -> None: - pass - - @mark_no_op - def leave_Semicolon_whitespace_before(self, node: "Semicolon") -> None: - pass - - @mark_no_op - def visit_Semicolon_whitespace_after(self, node: "Semicolon") -> None: - pass - - @mark_no_op - def leave_Semicolon_whitespace_after(self, node: "Semicolon") -> None: - pass - - @mark_no_op - def visit_Set(self, node: "Set") -> Optional[bool]: - pass - - @mark_no_op - def visit_Set_elements(self, node: "Set") -> None: - pass - - @mark_no_op - def leave_Set_elements(self, node: "Set") -> None: - pass - - @mark_no_op - def visit_Set_lbrace(self, node: "Set") -> None: - pass - - @mark_no_op - def leave_Set_lbrace(self, node: "Set") -> None: - pass - - @mark_no_op - def visit_Set_rbrace(self, node: "Set") -> None: - pass - - @mark_no_op - def leave_Set_rbrace(self, node: "Set") -> None: - pass - - @mark_no_op - def visit_Set_lpar(self, node: "Set") -> None: - pass - - @mark_no_op - def leave_Set_lpar(self, node: "Set") -> None: - pass - - @mark_no_op - def visit_Set_rpar(self, node: "Set") -> None: - pass - - @mark_no_op - def leave_Set_rpar(self, node: "Set") -> None: - pass - - @mark_no_op - def visit_SetComp(self, node: "SetComp") -> Optional[bool]: - pass - - @mark_no_op - def visit_SetComp_elt(self, node: "SetComp") -> None: - pass - - @mark_no_op - def leave_SetComp_elt(self, node: "SetComp") -> None: - pass - - @mark_no_op - def visit_SetComp_for_in(self, node: "SetComp") -> None: - pass - - @mark_no_op - def leave_SetComp_for_in(self, node: "SetComp") -> None: - pass - - @mark_no_op - def visit_SetComp_lbrace(self, node: "SetComp") -> None: - pass - - @mark_no_op - def leave_SetComp_lbrace(self, node: "SetComp") -> None: - pass - - @mark_no_op - def visit_SetComp_rbrace(self, node: "SetComp") -> None: - pass - - @mark_no_op - def leave_SetComp_rbrace(self, node: "SetComp") -> None: - pass - - @mark_no_op - def visit_SetComp_lpar(self, node: "SetComp") -> None: - pass - - @mark_no_op - def leave_SetComp_lpar(self, node: "SetComp") -> None: - pass - - @mark_no_op - def visit_SetComp_rpar(self, node: "SetComp") -> None: - pass - - @mark_no_op - def leave_SetComp_rpar(self, node: "SetComp") -> None: - pass - - @mark_no_op - def visit_SimpleStatementLine(self, node: "SimpleStatementLine") -> Optional[bool]: - pass - - @mark_no_op - def visit_SimpleStatementLine_body(self, node: "SimpleStatementLine") -> None: - pass - - @mark_no_op - def leave_SimpleStatementLine_body(self, node: "SimpleStatementLine") -> None: - pass - - @mark_no_op - def visit_SimpleStatementLine_leading_lines( - self, node: "SimpleStatementLine" - ) -> None: - pass - - @mark_no_op - def leave_SimpleStatementLine_leading_lines( - self, node: "SimpleStatementLine" - ) -> None: - pass - - @mark_no_op - def visit_SimpleStatementLine_trailing_whitespace( - self, node: "SimpleStatementLine" - ) -> None: - pass - - @mark_no_op - def leave_SimpleStatementLine_trailing_whitespace( - self, node: "SimpleStatementLine" - ) -> None: - pass - - @mark_no_op - def visit_SimpleStatementSuite( - self, node: "SimpleStatementSuite" - ) -> Optional[bool]: - pass - - @mark_no_op - def visit_SimpleStatementSuite_body(self, node: "SimpleStatementSuite") -> None: - pass - - @mark_no_op - def leave_SimpleStatementSuite_body(self, node: "SimpleStatementSuite") -> None: - pass - - @mark_no_op - def visit_SimpleStatementSuite_leading_whitespace( - self, node: "SimpleStatementSuite" - ) -> None: - pass - - @mark_no_op - def leave_SimpleStatementSuite_leading_whitespace( - self, node: "SimpleStatementSuite" - ) -> None: - pass - - @mark_no_op - def visit_SimpleStatementSuite_trailing_whitespace( - self, node: "SimpleStatementSuite" - ) -> None: - pass - - @mark_no_op - def leave_SimpleStatementSuite_trailing_whitespace( - self, node: "SimpleStatementSuite" - ) -> None: - pass - - @mark_no_op - def visit_SimpleString(self, node: "SimpleString") -> Optional[bool]: - pass - - @mark_no_op - def visit_SimpleString_value(self, node: "SimpleString") -> None: - pass - - @mark_no_op - def leave_SimpleString_value(self, node: "SimpleString") -> None: - pass - - @mark_no_op - def visit_SimpleString_lpar(self, node: "SimpleString") -> None: - pass - - @mark_no_op - def leave_SimpleString_lpar(self, node: "SimpleString") -> None: - pass - - @mark_no_op - def visit_SimpleString_rpar(self, node: "SimpleString") -> None: - pass - - @mark_no_op - def leave_SimpleString_rpar(self, node: "SimpleString") -> None: - pass - - @mark_no_op - def visit_SimpleWhitespace(self, node: "SimpleWhitespace") -> Optional[bool]: - pass - - @mark_no_op - def visit_SimpleWhitespace_value(self, node: "SimpleWhitespace") -> None: - pass - - @mark_no_op - def leave_SimpleWhitespace_value(self, node: "SimpleWhitespace") -> None: - pass - - @mark_no_op - def visit_Slice(self, node: "Slice") -> Optional[bool]: - pass - - @mark_no_op - def visit_Slice_lower(self, node: "Slice") -> None: - pass - - @mark_no_op - def leave_Slice_lower(self, node: "Slice") -> None: - pass - - @mark_no_op - def visit_Slice_upper(self, node: "Slice") -> None: - pass - - @mark_no_op - def leave_Slice_upper(self, node: "Slice") -> None: - pass - - @mark_no_op - def visit_Slice_step(self, node: "Slice") -> None: - pass - - @mark_no_op - def leave_Slice_step(self, node: "Slice") -> None: - pass - - @mark_no_op - def visit_Slice_first_colon(self, node: "Slice") -> None: - pass - - @mark_no_op - def leave_Slice_first_colon(self, node: "Slice") -> None: - pass - - @mark_no_op - def visit_Slice_second_colon(self, node: "Slice") -> None: - pass - - @mark_no_op - def leave_Slice_second_colon(self, node: "Slice") -> None: - pass - - @mark_no_op - def visit_StarredDictElement(self, node: "StarredDictElement") -> Optional[bool]: - pass - - @mark_no_op - def visit_StarredDictElement_value(self, node: "StarredDictElement") -> None: - pass - - @mark_no_op - def leave_StarredDictElement_value(self, node: "StarredDictElement") -> None: - pass - - @mark_no_op - def visit_StarredDictElement_comma(self, node: "StarredDictElement") -> None: - pass - - @mark_no_op - def leave_StarredDictElement_comma(self, node: "StarredDictElement") -> None: - pass - - @mark_no_op - def visit_StarredDictElement_whitespace_before_value( - self, node: "StarredDictElement" - ) -> None: - pass - - @mark_no_op - def leave_StarredDictElement_whitespace_before_value( - self, node: "StarredDictElement" - ) -> None: - pass - - @mark_no_op - def visit_StarredElement(self, node: "StarredElement") -> Optional[bool]: - pass - - @mark_no_op - def visit_StarredElement_value(self, node: "StarredElement") -> None: - pass - - @mark_no_op - def leave_StarredElement_value(self, node: "StarredElement") -> None: - pass - - @mark_no_op - def visit_StarredElement_comma(self, node: "StarredElement") -> None: - pass - - @mark_no_op - def leave_StarredElement_comma(self, node: "StarredElement") -> None: - pass - - @mark_no_op - def visit_StarredElement_lpar(self, node: "StarredElement") -> None: - pass - - @mark_no_op - def leave_StarredElement_lpar(self, node: "StarredElement") -> None: - pass - - @mark_no_op - def visit_StarredElement_rpar(self, node: "StarredElement") -> None: - pass - - @mark_no_op - def leave_StarredElement_rpar(self, node: "StarredElement") -> None: - pass - - @mark_no_op - def visit_StarredElement_whitespace_before_value( - self, node: "StarredElement" - ) -> None: - pass - - @mark_no_op - def leave_StarredElement_whitespace_before_value( - self, node: "StarredElement" - ) -> None: - pass - - @mark_no_op - def visit_Subscript(self, node: "Subscript") -> Optional[bool]: - pass - - @mark_no_op - def visit_Subscript_value(self, node: "Subscript") -> None: - pass - - @mark_no_op - def leave_Subscript_value(self, node: "Subscript") -> None: - pass - - @mark_no_op - def visit_Subscript_slice(self, node: "Subscript") -> None: - pass - - @mark_no_op - def leave_Subscript_slice(self, node: "Subscript") -> None: - pass - - @mark_no_op - def visit_Subscript_lbracket(self, node: "Subscript") -> None: - pass - - @mark_no_op - def leave_Subscript_lbracket(self, node: "Subscript") -> None: - pass - - @mark_no_op - def visit_Subscript_rbracket(self, node: "Subscript") -> None: - pass - - @mark_no_op - def leave_Subscript_rbracket(self, node: "Subscript") -> None: - pass - - @mark_no_op - def visit_Subscript_lpar(self, node: "Subscript") -> None: - pass - - @mark_no_op - def leave_Subscript_lpar(self, node: "Subscript") -> None: - pass - - @mark_no_op - def visit_Subscript_rpar(self, node: "Subscript") -> None: - pass - - @mark_no_op - def leave_Subscript_rpar(self, node: "Subscript") -> None: - pass - - @mark_no_op - def visit_Subscript_whitespace_after_value(self, node: "Subscript") -> None: - pass - - @mark_no_op - def leave_Subscript_whitespace_after_value(self, node: "Subscript") -> None: - pass - - @mark_no_op - def visit_SubscriptElement(self, node: "SubscriptElement") -> Optional[bool]: - pass - - @mark_no_op - def visit_SubscriptElement_slice(self, node: "SubscriptElement") -> None: - pass - - @mark_no_op - def leave_SubscriptElement_slice(self, node: "SubscriptElement") -> None: - pass - - @mark_no_op - def visit_SubscriptElement_comma(self, node: "SubscriptElement") -> None: - pass - - @mark_no_op - def leave_SubscriptElement_comma(self, node: "SubscriptElement") -> None: - pass - - @mark_no_op - def visit_Subtract(self, node: "Subtract") -> Optional[bool]: - pass - - @mark_no_op - def visit_Subtract_whitespace_before(self, node: "Subtract") -> None: - pass - - @mark_no_op - def leave_Subtract_whitespace_before(self, node: "Subtract") -> None: - pass - - @mark_no_op - def visit_Subtract_whitespace_after(self, node: "Subtract") -> None: - pass - - @mark_no_op - def leave_Subtract_whitespace_after(self, node: "Subtract") -> None: - pass - - @mark_no_op - def visit_SubtractAssign(self, node: "SubtractAssign") -> Optional[bool]: - pass - - @mark_no_op - def visit_SubtractAssign_whitespace_before(self, node: "SubtractAssign") -> None: - pass - - @mark_no_op - def leave_SubtractAssign_whitespace_before(self, node: "SubtractAssign") -> None: - pass - - @mark_no_op - def visit_SubtractAssign_whitespace_after(self, node: "SubtractAssign") -> None: - pass - - @mark_no_op - def leave_SubtractAssign_whitespace_after(self, node: "SubtractAssign") -> None: - pass - - @mark_no_op - def visit_TrailingWhitespace(self, node: "TrailingWhitespace") -> Optional[bool]: - pass - - @mark_no_op - def visit_TrailingWhitespace_whitespace(self, node: "TrailingWhitespace") -> None: - pass - - @mark_no_op - def leave_TrailingWhitespace_whitespace(self, node: "TrailingWhitespace") -> None: - pass - - @mark_no_op - def visit_TrailingWhitespace_comment(self, node: "TrailingWhitespace") -> None: - pass - - @mark_no_op - def leave_TrailingWhitespace_comment(self, node: "TrailingWhitespace") -> None: - pass - - @mark_no_op - def visit_TrailingWhitespace_newline(self, node: "TrailingWhitespace") -> None: - pass - - @mark_no_op - def leave_TrailingWhitespace_newline(self, node: "TrailingWhitespace") -> None: - pass - - @mark_no_op - def visit_Try(self, node: "Try") -> Optional[bool]: - pass - - @mark_no_op - def visit_Try_body(self, node: "Try") -> None: - pass - - @mark_no_op - def leave_Try_body(self, node: "Try") -> None: - pass - - @mark_no_op - def visit_Try_handlers(self, node: "Try") -> None: - pass - - @mark_no_op - def leave_Try_handlers(self, node: "Try") -> None: - pass - - @mark_no_op - def visit_Try_orelse(self, node: "Try") -> None: - pass - - @mark_no_op - def leave_Try_orelse(self, node: "Try") -> None: - pass - - @mark_no_op - def visit_Try_finalbody(self, node: "Try") -> None: - pass - - @mark_no_op - def leave_Try_finalbody(self, node: "Try") -> None: - pass - - @mark_no_op - def visit_Try_leading_lines(self, node: "Try") -> None: - pass - - @mark_no_op - def leave_Try_leading_lines(self, node: "Try") -> None: - pass - - @mark_no_op - def visit_Try_whitespace_before_colon(self, node: "Try") -> None: - pass - - @mark_no_op - def leave_Try_whitespace_before_colon(self, node: "Try") -> None: - pass - - @mark_no_op - def visit_TryStar(self, node: "TryStar") -> Optional[bool]: - pass - - @mark_no_op - def visit_TryStar_body(self, node: "TryStar") -> None: - pass - - @mark_no_op - def leave_TryStar_body(self, node: "TryStar") -> None: - pass - - @mark_no_op - def visit_TryStar_handlers(self, node: "TryStar") -> None: - pass - - @mark_no_op - def leave_TryStar_handlers(self, node: "TryStar") -> None: - pass - - @mark_no_op - def visit_TryStar_orelse(self, node: "TryStar") -> None: - pass - - @mark_no_op - def leave_TryStar_orelse(self, node: "TryStar") -> None: - pass - - @mark_no_op - def visit_TryStar_finalbody(self, node: "TryStar") -> None: - pass - - @mark_no_op - def leave_TryStar_finalbody(self, node: "TryStar") -> None: - pass - - @mark_no_op - def visit_TryStar_leading_lines(self, node: "TryStar") -> None: - pass - - @mark_no_op - def leave_TryStar_leading_lines(self, node: "TryStar") -> None: - pass - - @mark_no_op - def visit_TryStar_whitespace_before_colon(self, node: "TryStar") -> None: - pass - - @mark_no_op - def leave_TryStar_whitespace_before_colon(self, node: "TryStar") -> None: - pass - - @mark_no_op - def visit_Tuple(self, node: "Tuple") -> Optional[bool]: - pass - - @mark_no_op - def visit_Tuple_elements(self, node: "Tuple") -> None: - pass - - @mark_no_op - def leave_Tuple_elements(self, node: "Tuple") -> None: - pass - - @mark_no_op - def visit_Tuple_lpar(self, node: "Tuple") -> None: - pass - - @mark_no_op - def leave_Tuple_lpar(self, node: "Tuple") -> None: - pass - - @mark_no_op - def visit_Tuple_rpar(self, node: "Tuple") -> None: - pass - - @mark_no_op - def leave_Tuple_rpar(self, node: "Tuple") -> None: - pass - - @mark_no_op - def visit_TypeAlias(self, node: "TypeAlias") -> Optional[bool]: - pass - - @mark_no_op - def visit_TypeAlias_name(self, node: "TypeAlias") -> None: - pass - - @mark_no_op - def leave_TypeAlias_name(self, node: "TypeAlias") -> None: - pass - - @mark_no_op - def visit_TypeAlias_value(self, node: "TypeAlias") -> None: - pass - - @mark_no_op - def leave_TypeAlias_value(self, node: "TypeAlias") -> None: - pass - - @mark_no_op - def visit_TypeAlias_type_parameters(self, node: "TypeAlias") -> None: - pass - - @mark_no_op - def leave_TypeAlias_type_parameters(self, node: "TypeAlias") -> None: - pass - - @mark_no_op - def visit_TypeAlias_whitespace_after_type(self, node: "TypeAlias") -> None: - pass - - @mark_no_op - def leave_TypeAlias_whitespace_after_type(self, node: "TypeAlias") -> None: - pass - - @mark_no_op - def visit_TypeAlias_whitespace_after_name(self, node: "TypeAlias") -> None: - pass - - @mark_no_op - def leave_TypeAlias_whitespace_after_name(self, node: "TypeAlias") -> None: - pass - - @mark_no_op - def visit_TypeAlias_whitespace_after_type_parameters( - self, node: "TypeAlias" - ) -> None: - pass - - @mark_no_op - def leave_TypeAlias_whitespace_after_type_parameters( - self, node: "TypeAlias" - ) -> None: - pass - - @mark_no_op - def visit_TypeAlias_whitespace_after_equals(self, node: "TypeAlias") -> None: - pass - - @mark_no_op - def leave_TypeAlias_whitespace_after_equals(self, node: "TypeAlias") -> None: - pass - - @mark_no_op - def visit_TypeAlias_semicolon(self, node: "TypeAlias") -> None: - pass - - @mark_no_op - def leave_TypeAlias_semicolon(self, node: "TypeAlias") -> None: - pass - - @mark_no_op - def visit_TypeParam(self, node: "TypeParam") -> Optional[bool]: - pass - - @mark_no_op - def visit_TypeParam_param(self, node: "TypeParam") -> None: - pass - - @mark_no_op - def leave_TypeParam_param(self, node: "TypeParam") -> None: - pass - - @mark_no_op - def visit_TypeParam_comma(self, node: "TypeParam") -> None: - pass - - @mark_no_op - def leave_TypeParam_comma(self, node: "TypeParam") -> None: - pass - - @mark_no_op - def visit_TypeParameters(self, node: "TypeParameters") -> Optional[bool]: - pass - - @mark_no_op - def visit_TypeParameters_params(self, node: "TypeParameters") -> None: - pass - - @mark_no_op - def leave_TypeParameters_params(self, node: "TypeParameters") -> None: - pass - - @mark_no_op - def visit_TypeParameters_lbracket(self, node: "TypeParameters") -> None: - pass - - @mark_no_op - def leave_TypeParameters_lbracket(self, node: "TypeParameters") -> None: - pass - - @mark_no_op - def visit_TypeParameters_rbracket(self, node: "TypeParameters") -> None: - pass - - @mark_no_op - def leave_TypeParameters_rbracket(self, node: "TypeParameters") -> None: - pass - - @mark_no_op - def visit_TypeVar(self, node: "TypeVar") -> Optional[bool]: - pass - - @mark_no_op - def visit_TypeVar_name(self, node: "TypeVar") -> None: - pass - - @mark_no_op - def leave_TypeVar_name(self, node: "TypeVar") -> None: - pass - - @mark_no_op - def visit_TypeVar_bound(self, node: "TypeVar") -> None: - pass - - @mark_no_op - def leave_TypeVar_bound(self, node: "TypeVar") -> None: - pass - - @mark_no_op - def visit_TypeVar_colon(self, node: "TypeVar") -> None: - pass - - @mark_no_op - def leave_TypeVar_colon(self, node: "TypeVar") -> None: - pass - - @mark_no_op - def visit_TypeVarTuple(self, node: "TypeVarTuple") -> Optional[bool]: - pass - - @mark_no_op - def visit_TypeVarTuple_name(self, node: "TypeVarTuple") -> None: - pass - - @mark_no_op - def leave_TypeVarTuple_name(self, node: "TypeVarTuple") -> None: - pass - - @mark_no_op - def visit_TypeVarTuple_whitespace_after_star(self, node: "TypeVarTuple") -> None: - pass - - @mark_no_op - def leave_TypeVarTuple_whitespace_after_star(self, node: "TypeVarTuple") -> None: - pass - - @mark_no_op - def visit_UnaryOperation(self, node: "UnaryOperation") -> Optional[bool]: - pass - - @mark_no_op - def visit_UnaryOperation_operator(self, node: "UnaryOperation") -> None: - pass - - @mark_no_op - def leave_UnaryOperation_operator(self, node: "UnaryOperation") -> None: - pass - - @mark_no_op - def visit_UnaryOperation_expression(self, node: "UnaryOperation") -> None: - pass - - @mark_no_op - def leave_UnaryOperation_expression(self, node: "UnaryOperation") -> None: - pass - - @mark_no_op - def visit_UnaryOperation_lpar(self, node: "UnaryOperation") -> None: - pass - - @mark_no_op - def leave_UnaryOperation_lpar(self, node: "UnaryOperation") -> None: - pass - - @mark_no_op - def visit_UnaryOperation_rpar(self, node: "UnaryOperation") -> None: - pass - - @mark_no_op - def leave_UnaryOperation_rpar(self, node: "UnaryOperation") -> None: - pass - - @mark_no_op - def visit_While(self, node: "While") -> Optional[bool]: - pass - - @mark_no_op - def visit_While_test(self, node: "While") -> None: - pass - - @mark_no_op - def leave_While_test(self, node: "While") -> None: - pass - - @mark_no_op - def visit_While_body(self, node: "While") -> None: - pass - - @mark_no_op - def leave_While_body(self, node: "While") -> None: - pass - - @mark_no_op - def visit_While_orelse(self, node: "While") -> None: - pass - - @mark_no_op - def leave_While_orelse(self, node: "While") -> None: - pass - - @mark_no_op - def visit_While_leading_lines(self, node: "While") -> None: - pass - - @mark_no_op - def leave_While_leading_lines(self, node: "While") -> None: - pass - - @mark_no_op - def visit_While_whitespace_after_while(self, node: "While") -> None: - pass - - @mark_no_op - def leave_While_whitespace_after_while(self, node: "While") -> None: - pass - - @mark_no_op - def visit_While_whitespace_before_colon(self, node: "While") -> None: - pass - - @mark_no_op - def leave_While_whitespace_before_colon(self, node: "While") -> None: - pass - - @mark_no_op - def visit_With(self, node: "With") -> Optional[bool]: - pass - - @mark_no_op - def visit_With_items(self, node: "With") -> None: - pass - - @mark_no_op - def leave_With_items(self, node: "With") -> None: - pass - - @mark_no_op - def visit_With_body(self, node: "With") -> None: - pass - - @mark_no_op - def leave_With_body(self, node: "With") -> None: - pass - - @mark_no_op - def visit_With_asynchronous(self, node: "With") -> None: - pass - - @mark_no_op - def leave_With_asynchronous(self, node: "With") -> None: - pass - - @mark_no_op - def visit_With_leading_lines(self, node: "With") -> None: - pass - - @mark_no_op - def leave_With_leading_lines(self, node: "With") -> None: - pass - - @mark_no_op - def visit_With_lpar(self, node: "With") -> None: - pass - - @mark_no_op - def leave_With_lpar(self, node: "With") -> None: - pass - - @mark_no_op - def visit_With_rpar(self, node: "With") -> None: - pass - - @mark_no_op - def leave_With_rpar(self, node: "With") -> None: - pass - - @mark_no_op - def visit_With_whitespace_after_with(self, node: "With") -> None: - pass - - @mark_no_op - def leave_With_whitespace_after_with(self, node: "With") -> None: - pass - - @mark_no_op - def visit_With_whitespace_before_colon(self, node: "With") -> None: - pass - - @mark_no_op - def leave_With_whitespace_before_colon(self, node: "With") -> None: - pass - - @mark_no_op - def visit_WithItem(self, node: "WithItem") -> Optional[bool]: - pass - - @mark_no_op - def visit_WithItem_item(self, node: "WithItem") -> None: - pass - - @mark_no_op - def leave_WithItem_item(self, node: "WithItem") -> None: - pass - - @mark_no_op - def visit_WithItem_asname(self, node: "WithItem") -> None: - pass - - @mark_no_op - def leave_WithItem_asname(self, node: "WithItem") -> None: - pass - - @mark_no_op - def visit_WithItem_comma(self, node: "WithItem") -> None: - pass - - @mark_no_op - def leave_WithItem_comma(self, node: "WithItem") -> None: - pass - - @mark_no_op - def visit_Yield(self, node: "Yield") -> Optional[bool]: - pass - - @mark_no_op - def visit_Yield_value(self, node: "Yield") -> None: - pass - - @mark_no_op - def leave_Yield_value(self, node: "Yield") -> None: - pass - - @mark_no_op - def visit_Yield_lpar(self, node: "Yield") -> None: - pass - - @mark_no_op - def leave_Yield_lpar(self, node: "Yield") -> None: - pass - - @mark_no_op - def visit_Yield_rpar(self, node: "Yield") -> None: - pass - - @mark_no_op - def leave_Yield_rpar(self, node: "Yield") -> None: - pass - - @mark_no_op - def visit_Yield_whitespace_after_yield(self, node: "Yield") -> None: - pass - - @mark_no_op - def leave_Yield_whitespace_after_yield(self, node: "Yield") -> None: - pass - - -class CSTTypedVisitorFunctions(CSTTypedBaseFunctions): - @mark_no_op - def leave_Add(self, original_node: "Add") -> None: - pass - - @mark_no_op - def leave_AddAssign(self, original_node: "AddAssign") -> None: - pass - - @mark_no_op - def leave_And(self, original_node: "And") -> None: - pass - - @mark_no_op - def leave_AnnAssign(self, original_node: "AnnAssign") -> None: - pass - - @mark_no_op - def leave_Annotation(self, original_node: "Annotation") -> None: - pass - - @mark_no_op - def leave_Arg(self, original_node: "Arg") -> None: - pass - - @mark_no_op - def leave_AsName(self, original_node: "AsName") -> None: - pass - - @mark_no_op - def leave_Assert(self, original_node: "Assert") -> None: - pass - - @mark_no_op - def leave_Assign(self, original_node: "Assign") -> None: - pass - - @mark_no_op - def leave_AssignEqual(self, original_node: "AssignEqual") -> None: - pass - - @mark_no_op - def leave_AssignTarget(self, original_node: "AssignTarget") -> None: - pass - - @mark_no_op - def leave_Asynchronous(self, original_node: "Asynchronous") -> None: - pass - - @mark_no_op - def leave_Attribute(self, original_node: "Attribute") -> None: - pass - - @mark_no_op - def leave_AugAssign(self, original_node: "AugAssign") -> None: - pass - - @mark_no_op - def leave_Await(self, original_node: "Await") -> None: - pass - - @mark_no_op - def leave_BinaryOperation(self, original_node: "BinaryOperation") -> None: - pass - - @mark_no_op - def leave_BitAnd(self, original_node: "BitAnd") -> None: - pass - - @mark_no_op - def leave_BitAndAssign(self, original_node: "BitAndAssign") -> None: - pass - - @mark_no_op - def leave_BitInvert(self, original_node: "BitInvert") -> None: - pass - - @mark_no_op - def leave_BitOr(self, original_node: "BitOr") -> None: - pass - - @mark_no_op - def leave_BitOrAssign(self, original_node: "BitOrAssign") -> None: - pass - - @mark_no_op - def leave_BitXor(self, original_node: "BitXor") -> None: - pass - - @mark_no_op - def leave_BitXorAssign(self, original_node: "BitXorAssign") -> None: - pass - - @mark_no_op - def leave_BooleanOperation(self, original_node: "BooleanOperation") -> None: - pass - - @mark_no_op - def leave_Break(self, original_node: "Break") -> None: - pass - - @mark_no_op - def leave_Call(self, original_node: "Call") -> None: - pass - - @mark_no_op - def leave_ClassDef(self, original_node: "ClassDef") -> None: - pass - - @mark_no_op - def leave_Colon(self, original_node: "Colon") -> None: - pass - - @mark_no_op - def leave_Comma(self, original_node: "Comma") -> None: - pass - - @mark_no_op - def leave_Comment(self, original_node: "Comment") -> None: - pass - - @mark_no_op - def leave_CompFor(self, original_node: "CompFor") -> None: - pass - - @mark_no_op - def leave_CompIf(self, original_node: "CompIf") -> None: - pass - - @mark_no_op - def leave_Comparison(self, original_node: "Comparison") -> None: - pass - - @mark_no_op - def leave_ComparisonTarget(self, original_node: "ComparisonTarget") -> None: - pass - - @mark_no_op - def leave_ConcatenatedString(self, original_node: "ConcatenatedString") -> None: - pass - - @mark_no_op - def leave_Continue(self, original_node: "Continue") -> None: - pass - - @mark_no_op - def leave_Decorator(self, original_node: "Decorator") -> None: - pass - - @mark_no_op - def leave_Del(self, original_node: "Del") -> None: - pass - - @mark_no_op - def leave_Dict(self, original_node: "Dict") -> None: - pass - - @mark_no_op - def leave_DictComp(self, original_node: "DictComp") -> None: - pass - - @mark_no_op - def leave_DictElement(self, original_node: "DictElement") -> None: - pass - - @mark_no_op - def leave_Divide(self, original_node: "Divide") -> None: - pass - - @mark_no_op - def leave_DivideAssign(self, original_node: "DivideAssign") -> None: - pass - - @mark_no_op - def leave_Dot(self, original_node: "Dot") -> None: - pass - - @mark_no_op - def leave_Element(self, original_node: "Element") -> None: - pass - - @mark_no_op - def leave_Ellipsis(self, original_node: "Ellipsis") -> None: - pass - - @mark_no_op - def leave_Else(self, original_node: "Else") -> None: - pass - - @mark_no_op - def leave_EmptyLine(self, original_node: "EmptyLine") -> None: - pass - - @mark_no_op - def leave_Equal(self, original_node: "Equal") -> None: - pass - - @mark_no_op - def leave_ExceptHandler(self, original_node: "ExceptHandler") -> None: - pass - - @mark_no_op - def leave_ExceptStarHandler(self, original_node: "ExceptStarHandler") -> None: - pass - - @mark_no_op - def leave_Expr(self, original_node: "Expr") -> None: - pass - - @mark_no_op - def leave_Finally(self, original_node: "Finally") -> None: - pass - - @mark_no_op - def leave_Float(self, original_node: "Float") -> None: - pass - - @mark_no_op - def leave_FloorDivide(self, original_node: "FloorDivide") -> None: - pass - - @mark_no_op - def leave_FloorDivideAssign(self, original_node: "FloorDivideAssign") -> None: - pass - - @mark_no_op - def leave_For(self, original_node: "For") -> None: - pass - - @mark_no_op - def leave_FormattedString(self, original_node: "FormattedString") -> None: - pass - - @mark_no_op - def leave_FormattedStringExpression( - self, original_node: "FormattedStringExpression" - ) -> None: - pass - - @mark_no_op - def leave_FormattedStringText(self, original_node: "FormattedStringText") -> None: - pass - - @mark_no_op - def leave_From(self, original_node: "From") -> None: - pass - - @mark_no_op - def leave_FunctionDef(self, original_node: "FunctionDef") -> None: - pass - - @mark_no_op - def leave_GeneratorExp(self, original_node: "GeneratorExp") -> None: - pass - - @mark_no_op - def leave_Global(self, original_node: "Global") -> None: - pass - - @mark_no_op - def leave_GreaterThan(self, original_node: "GreaterThan") -> None: - pass - - @mark_no_op - def leave_GreaterThanEqual(self, original_node: "GreaterThanEqual") -> None: - pass - - @mark_no_op - def leave_If(self, original_node: "If") -> None: - pass - - @mark_no_op - def leave_IfExp(self, original_node: "IfExp") -> None: - pass - - @mark_no_op - def leave_Imaginary(self, original_node: "Imaginary") -> None: - pass - - @mark_no_op - def leave_Import(self, original_node: "Import") -> None: - pass - - @mark_no_op - def leave_ImportAlias(self, original_node: "ImportAlias") -> None: - pass - - @mark_no_op - def leave_ImportFrom(self, original_node: "ImportFrom") -> None: - pass - - @mark_no_op - def leave_ImportStar(self, original_node: "ImportStar") -> None: - pass - - @mark_no_op - def leave_In(self, original_node: "In") -> None: - pass - - @mark_no_op - def leave_IndentedBlock(self, original_node: "IndentedBlock") -> None: - pass - - @mark_no_op - def leave_Index(self, original_node: "Index") -> None: - pass - - @mark_no_op - def leave_Integer(self, original_node: "Integer") -> None: - pass - - @mark_no_op - def leave_Is(self, original_node: "Is") -> None: - pass - - @mark_no_op - def leave_IsNot(self, original_node: "IsNot") -> None: - pass - - @mark_no_op - def leave_Lambda(self, original_node: "Lambda") -> None: - pass - - @mark_no_op - def leave_LeftCurlyBrace(self, original_node: "LeftCurlyBrace") -> None: - pass - - @mark_no_op - def leave_LeftParen(self, original_node: "LeftParen") -> None: - pass - - @mark_no_op - def leave_LeftShift(self, original_node: "LeftShift") -> None: - pass - - @mark_no_op - def leave_LeftShiftAssign(self, original_node: "LeftShiftAssign") -> None: - pass - - @mark_no_op - def leave_LeftSquareBracket(self, original_node: "LeftSquareBracket") -> None: - pass - - @mark_no_op - def leave_LessThan(self, original_node: "LessThan") -> None: - pass - - @mark_no_op - def leave_LessThanEqual(self, original_node: "LessThanEqual") -> None: - pass - - @mark_no_op - def leave_List(self, original_node: "List") -> None: - pass - - @mark_no_op - def leave_ListComp(self, original_node: "ListComp") -> None: - pass - - @mark_no_op - def leave_Match(self, original_node: "Match") -> None: - pass - - @mark_no_op - def leave_MatchAs(self, original_node: "MatchAs") -> None: - pass - - @mark_no_op - def leave_MatchCase(self, original_node: "MatchCase") -> None: - pass - - @mark_no_op - def leave_MatchClass(self, original_node: "MatchClass") -> None: - pass - - @mark_no_op - def leave_MatchKeywordElement(self, original_node: "MatchKeywordElement") -> None: - pass - - @mark_no_op - def leave_MatchList(self, original_node: "MatchList") -> None: - pass - - @mark_no_op - def leave_MatchMapping(self, original_node: "MatchMapping") -> None: - pass - - @mark_no_op - def leave_MatchMappingElement(self, original_node: "MatchMappingElement") -> None: - pass - - @mark_no_op - def leave_MatchOr(self, original_node: "MatchOr") -> None: - pass - - @mark_no_op - def leave_MatchOrElement(self, original_node: "MatchOrElement") -> None: - pass - - @mark_no_op - def leave_MatchPattern(self, original_node: "MatchPattern") -> None: - pass - - @mark_no_op - def leave_MatchSequence(self, original_node: "MatchSequence") -> None: - pass - - @mark_no_op - def leave_MatchSequenceElement(self, original_node: "MatchSequenceElement") -> None: - pass - - @mark_no_op - def leave_MatchSingleton(self, original_node: "MatchSingleton") -> None: - pass - - @mark_no_op - def leave_MatchStar(self, original_node: "MatchStar") -> None: - pass - - @mark_no_op - def leave_MatchTuple(self, original_node: "MatchTuple") -> None: - pass - - @mark_no_op - def leave_MatchValue(self, original_node: "MatchValue") -> None: - pass - - @mark_no_op - def leave_MatrixMultiply(self, original_node: "MatrixMultiply") -> None: - pass - - @mark_no_op - def leave_MatrixMultiplyAssign(self, original_node: "MatrixMultiplyAssign") -> None: - pass - - @mark_no_op - def leave_Minus(self, original_node: "Minus") -> None: - pass - - @mark_no_op - def leave_Module(self, original_node: "Module") -> None: - pass - - @mark_no_op - def leave_Modulo(self, original_node: "Modulo") -> None: - pass - - @mark_no_op - def leave_ModuloAssign(self, original_node: "ModuloAssign") -> None: - pass - - @mark_no_op - def leave_Multiply(self, original_node: "Multiply") -> None: - pass - - @mark_no_op - def leave_MultiplyAssign(self, original_node: "MultiplyAssign") -> None: - pass - - @mark_no_op - def leave_Name(self, original_node: "Name") -> None: - pass - - @mark_no_op - def leave_NameItem(self, original_node: "NameItem") -> None: - pass - - @mark_no_op - def leave_NamedExpr(self, original_node: "NamedExpr") -> None: - pass - - @mark_no_op - def leave_Newline(self, original_node: "Newline") -> None: - pass - - @mark_no_op - def leave_Nonlocal(self, original_node: "Nonlocal") -> None: - pass - - @mark_no_op - def leave_Not(self, original_node: "Not") -> None: - pass - - @mark_no_op - def leave_NotEqual(self, original_node: "NotEqual") -> None: - pass - - @mark_no_op - def leave_NotIn(self, original_node: "NotIn") -> None: - pass - - @mark_no_op - def leave_Or(self, original_node: "Or") -> None: - pass - - @mark_no_op - def leave_Param(self, original_node: "Param") -> None: - pass - - @mark_no_op - def leave_ParamSlash(self, original_node: "ParamSlash") -> None: - pass - - @mark_no_op - def leave_ParamSpec(self, original_node: "ParamSpec") -> None: - pass - - @mark_no_op - def leave_ParamStar(self, original_node: "ParamStar") -> None: - pass - - @mark_no_op - def leave_Parameters(self, original_node: "Parameters") -> None: - pass - - @mark_no_op - def leave_ParenthesizedWhitespace( - self, original_node: "ParenthesizedWhitespace" - ) -> None: - pass - - @mark_no_op - def leave_Pass(self, original_node: "Pass") -> None: - pass - - @mark_no_op - def leave_Plus(self, original_node: "Plus") -> None: - pass - - @mark_no_op - def leave_Power(self, original_node: "Power") -> None: - pass - - @mark_no_op - def leave_PowerAssign(self, original_node: "PowerAssign") -> None: - pass - - @mark_no_op - def leave_Raise(self, original_node: "Raise") -> None: - pass - - @mark_no_op - def leave_Return(self, original_node: "Return") -> None: - pass - - @mark_no_op - def leave_RightCurlyBrace(self, original_node: "RightCurlyBrace") -> None: - pass - - @mark_no_op - def leave_RightParen(self, original_node: "RightParen") -> None: - pass - - @mark_no_op - def leave_RightShift(self, original_node: "RightShift") -> None: - pass - - @mark_no_op - def leave_RightShiftAssign(self, original_node: "RightShiftAssign") -> None: - pass - - @mark_no_op - def leave_RightSquareBracket(self, original_node: "RightSquareBracket") -> None: - pass - - @mark_no_op - def leave_Semicolon(self, original_node: "Semicolon") -> None: - pass - - @mark_no_op - def leave_Set(self, original_node: "Set") -> None: - pass - - @mark_no_op - def leave_SetComp(self, original_node: "SetComp") -> None: - pass - - @mark_no_op - def leave_SimpleStatementLine(self, original_node: "SimpleStatementLine") -> None: - pass - - @mark_no_op - def leave_SimpleStatementSuite(self, original_node: "SimpleStatementSuite") -> None: - pass - - @mark_no_op - def leave_SimpleString(self, original_node: "SimpleString") -> None: - pass - - @mark_no_op - def leave_SimpleWhitespace(self, original_node: "SimpleWhitespace") -> None: - pass - - @mark_no_op - def leave_Slice(self, original_node: "Slice") -> None: - pass - - @mark_no_op - def leave_StarredDictElement(self, original_node: "StarredDictElement") -> None: - pass - - @mark_no_op - def leave_StarredElement(self, original_node: "StarredElement") -> None: - pass - - @mark_no_op - def leave_Subscript(self, original_node: "Subscript") -> None: - pass - - @mark_no_op - def leave_SubscriptElement(self, original_node: "SubscriptElement") -> None: - pass - - @mark_no_op - def leave_Subtract(self, original_node: "Subtract") -> None: - pass - - @mark_no_op - def leave_SubtractAssign(self, original_node: "SubtractAssign") -> None: - pass - - @mark_no_op - def leave_TrailingWhitespace(self, original_node: "TrailingWhitespace") -> None: - pass - - @mark_no_op - def leave_Try(self, original_node: "Try") -> None: - pass - - @mark_no_op - def leave_TryStar(self, original_node: "TryStar") -> None: - pass - - @mark_no_op - def leave_Tuple(self, original_node: "Tuple") -> None: - pass - - @mark_no_op - def leave_TypeAlias(self, original_node: "TypeAlias") -> None: - pass - - @mark_no_op - def leave_TypeParam(self, original_node: "TypeParam") -> None: - pass - - @mark_no_op - def leave_TypeParameters(self, original_node: "TypeParameters") -> None: - pass - - @mark_no_op - def leave_TypeVar(self, original_node: "TypeVar") -> None: - pass - - @mark_no_op - def leave_TypeVarTuple(self, original_node: "TypeVarTuple") -> None: - pass - - @mark_no_op - def leave_UnaryOperation(self, original_node: "UnaryOperation") -> None: - pass - - @mark_no_op - def leave_While(self, original_node: "While") -> None: - pass - - @mark_no_op - def leave_With(self, original_node: "With") -> None: - pass - - @mark_no_op - def leave_WithItem(self, original_node: "WithItem") -> None: - pass - - @mark_no_op - def leave_Yield(self, original_node: "Yield") -> None: - pass - - -class CSTTypedTransformerFunctions(CSTTypedBaseFunctions): - @mark_no_op - def leave_Add(self, original_node: "Add", updated_node: "Add") -> "BaseBinaryOp": - return updated_node - - @mark_no_op - def leave_AddAssign( - self, original_node: "AddAssign", updated_node: "AddAssign" - ) -> "BaseAugOp": - return updated_node - - @mark_no_op - def leave_And(self, original_node: "And", updated_node: "And") -> "BaseBooleanOp": - return updated_node - - @mark_no_op - def leave_AnnAssign( - self, original_node: "AnnAssign", updated_node: "AnnAssign" - ) -> Union[ - "BaseSmallStatement", FlattenSentinel["BaseSmallStatement"], RemovalSentinel - ]: - return updated_node - - @mark_no_op - def leave_Annotation( - self, original_node: "Annotation", updated_node: "Annotation" - ) -> "Annotation": - return updated_node - - @mark_no_op - def leave_Arg( - self, original_node: "Arg", updated_node: "Arg" - ) -> Union["Arg", FlattenSentinel["Arg"], RemovalSentinel]: - return updated_node - - @mark_no_op - def leave_AsName(self, original_node: "AsName", updated_node: "AsName") -> "AsName": - return updated_node - - @mark_no_op - def leave_Assert( - self, original_node: "Assert", updated_node: "Assert" - ) -> Union[ - "BaseSmallStatement", FlattenSentinel["BaseSmallStatement"], RemovalSentinel - ]: - return updated_node - - @mark_no_op - def leave_Assign( - self, original_node: "Assign", updated_node: "Assign" - ) -> Union[ - "BaseSmallStatement", FlattenSentinel["BaseSmallStatement"], RemovalSentinel - ]: - return updated_node - - @mark_no_op - def leave_AssignEqual( - self, original_node: "AssignEqual", updated_node: "AssignEqual" - ) -> Union["AssignEqual", MaybeSentinel]: - return updated_node - - @mark_no_op - def leave_AssignTarget( - self, original_node: "AssignTarget", updated_node: "AssignTarget" - ) -> Union["AssignTarget", FlattenSentinel["AssignTarget"], RemovalSentinel]: - return updated_node - - @mark_no_op - def leave_Asynchronous( - self, original_node: "Asynchronous", updated_node: "Asynchronous" - ) -> "Asynchronous": - return updated_node - - @mark_no_op - def leave_Attribute( - self, original_node: "Attribute", updated_node: "Attribute" - ) -> "BaseExpression": - return updated_node - - @mark_no_op - def leave_AugAssign( - self, original_node: "AugAssign", updated_node: "AugAssign" - ) -> Union[ - "BaseSmallStatement", FlattenSentinel["BaseSmallStatement"], RemovalSentinel - ]: - return updated_node - - @mark_no_op - def leave_Await( - self, original_node: "Await", updated_node: "Await" - ) -> "BaseExpression": - return updated_node - - @mark_no_op - def leave_BinaryOperation( - self, original_node: "BinaryOperation", updated_node: "BinaryOperation" - ) -> "BaseExpression": - return updated_node - - @mark_no_op - def leave_BitAnd( - self, original_node: "BitAnd", updated_node: "BitAnd" - ) -> "BaseBinaryOp": - return updated_node - - @mark_no_op - def leave_BitAndAssign( - self, original_node: "BitAndAssign", updated_node: "BitAndAssign" - ) -> "BaseAugOp": - return updated_node - - @mark_no_op - def leave_BitInvert( - self, original_node: "BitInvert", updated_node: "BitInvert" - ) -> "BaseUnaryOp": - return updated_node - - @mark_no_op - def leave_BitOr( - self, original_node: "BitOr", updated_node: "BitOr" - ) -> Union["BaseBinaryOp", MaybeSentinel]: - return updated_node - - @mark_no_op - def leave_BitOrAssign( - self, original_node: "BitOrAssign", updated_node: "BitOrAssign" - ) -> "BaseAugOp": - return updated_node - - @mark_no_op - def leave_BitXor( - self, original_node: "BitXor", updated_node: "BitXor" - ) -> "BaseBinaryOp": - return updated_node - - @mark_no_op - def leave_BitXorAssign( - self, original_node: "BitXorAssign", updated_node: "BitXorAssign" - ) -> "BaseAugOp": - return updated_node - - @mark_no_op - def leave_BooleanOperation( - self, original_node: "BooleanOperation", updated_node: "BooleanOperation" - ) -> "BaseExpression": - return updated_node - - @mark_no_op - def leave_Break( - self, original_node: "Break", updated_node: "Break" - ) -> Union[ - "BaseSmallStatement", FlattenSentinel["BaseSmallStatement"], RemovalSentinel - ]: - return updated_node - - @mark_no_op - def leave_Call( - self, original_node: "Call", updated_node: "Call" - ) -> "BaseExpression": - return updated_node - - @mark_no_op - def leave_ClassDef( - self, original_node: "ClassDef", updated_node: "ClassDef" - ) -> Union["BaseStatement", FlattenSentinel["BaseStatement"], RemovalSentinel]: - return updated_node - - @mark_no_op - def leave_Colon( - self, original_node: "Colon", updated_node: "Colon" - ) -> Union["Colon", MaybeSentinel]: - return updated_node - - @mark_no_op - def leave_Comma( - self, original_node: "Comma", updated_node: "Comma" - ) -> Union["Comma", MaybeSentinel]: - return updated_node - - @mark_no_op - def leave_Comment( - self, original_node: "Comment", updated_node: "Comment" - ) -> "Comment": - return updated_node - - @mark_no_op - def leave_CompFor( - self, original_node: "CompFor", updated_node: "CompFor" - ) -> "CompFor": - return updated_node - - @mark_no_op - def leave_CompIf(self, original_node: "CompIf", updated_node: "CompIf") -> "CompIf": - return updated_node - - @mark_no_op - def leave_Comparison( - self, original_node: "Comparison", updated_node: "Comparison" - ) -> "BaseExpression": - return updated_node - - @mark_no_op - def leave_ComparisonTarget( - self, original_node: "ComparisonTarget", updated_node: "ComparisonTarget" - ) -> Union[ - "ComparisonTarget", FlattenSentinel["ComparisonTarget"], RemovalSentinel - ]: - return updated_node - - @mark_no_op - def leave_ConcatenatedString( - self, original_node: "ConcatenatedString", updated_node: "ConcatenatedString" - ) -> "BaseExpression": - return updated_node - - @mark_no_op - def leave_Continue( - self, original_node: "Continue", updated_node: "Continue" - ) -> Union[ - "BaseSmallStatement", FlattenSentinel["BaseSmallStatement"], RemovalSentinel - ]: - return updated_node - - @mark_no_op - def leave_Decorator( - self, original_node: "Decorator", updated_node: "Decorator" - ) -> Union["Decorator", FlattenSentinel["Decorator"], RemovalSentinel]: - return updated_node - - @mark_no_op - def leave_Del( - self, original_node: "Del", updated_node: "Del" - ) -> Union[ - "BaseSmallStatement", FlattenSentinel["BaseSmallStatement"], RemovalSentinel - ]: - return updated_node - - @mark_no_op - def leave_Dict( - self, original_node: "Dict", updated_node: "Dict" - ) -> "BaseExpression": - return updated_node - - @mark_no_op - def leave_DictComp( - self, original_node: "DictComp", updated_node: "DictComp" - ) -> "BaseExpression": - return updated_node - - @mark_no_op - def leave_DictElement( - self, original_node: "DictElement", updated_node: "DictElement" - ) -> Union["BaseDictElement", FlattenSentinel["BaseDictElement"], RemovalSentinel]: - return updated_node - - @mark_no_op - def leave_Divide( - self, original_node: "Divide", updated_node: "Divide" - ) -> "BaseBinaryOp": - return updated_node - - @mark_no_op - def leave_DivideAssign( - self, original_node: "DivideAssign", updated_node: "DivideAssign" - ) -> "BaseAugOp": - return updated_node - - @mark_no_op - def leave_Dot( - self, original_node: "Dot", updated_node: "Dot" - ) -> Union["Dot", FlattenSentinel["Dot"], RemovalSentinel]: - return updated_node - - @mark_no_op - def leave_Element( - self, original_node: "Element", updated_node: "Element" - ) -> Union["BaseElement", FlattenSentinel["BaseElement"], RemovalSentinel]: - return updated_node - - @mark_no_op - def leave_Ellipsis( - self, original_node: "Ellipsis", updated_node: "Ellipsis" - ) -> "BaseExpression": - return updated_node - - @mark_no_op - def leave_Else(self, original_node: "Else", updated_node: "Else") -> "Else": - return updated_node - - @mark_no_op - def leave_EmptyLine( - self, original_node: "EmptyLine", updated_node: "EmptyLine" - ) -> Union["EmptyLine", FlattenSentinel["EmptyLine"], RemovalSentinel]: - return updated_node - - @mark_no_op - def leave_Equal( - self, original_node: "Equal", updated_node: "Equal" - ) -> "BaseCompOp": - return updated_node - - @mark_no_op - def leave_ExceptHandler( - self, original_node: "ExceptHandler", updated_node: "ExceptHandler" - ) -> Union["ExceptHandler", FlattenSentinel["ExceptHandler"], RemovalSentinel]: - return updated_node - - @mark_no_op - def leave_ExceptStarHandler( - self, original_node: "ExceptStarHandler", updated_node: "ExceptStarHandler" - ) -> Union[ - "ExceptStarHandler", FlattenSentinel["ExceptStarHandler"], RemovalSentinel - ]: - return updated_node - - @mark_no_op - def leave_Expr( - self, original_node: "Expr", updated_node: "Expr" - ) -> Union[ - "BaseSmallStatement", FlattenSentinel["BaseSmallStatement"], RemovalSentinel - ]: - return updated_node - - @mark_no_op - def leave_Finally( - self, original_node: "Finally", updated_node: "Finally" - ) -> "Finally": - return updated_node - - @mark_no_op - def leave_Float( - self, original_node: "Float", updated_node: "Float" - ) -> "BaseExpression": - return updated_node - - @mark_no_op - def leave_FloorDivide( - self, original_node: "FloorDivide", updated_node: "FloorDivide" - ) -> "BaseBinaryOp": - return updated_node - - @mark_no_op - def leave_FloorDivideAssign( - self, original_node: "FloorDivideAssign", updated_node: "FloorDivideAssign" - ) -> "BaseAugOp": - return updated_node - - @mark_no_op - def leave_For( - self, original_node: "For", updated_node: "For" - ) -> Union["BaseStatement", FlattenSentinel["BaseStatement"], RemovalSentinel]: - return updated_node - - @mark_no_op - def leave_FormattedString( - self, original_node: "FormattedString", updated_node: "FormattedString" - ) -> "BaseExpression": - return updated_node - - @mark_no_op - def leave_FormattedStringExpression( - self, - original_node: "FormattedStringExpression", - updated_node: "FormattedStringExpression", - ) -> Union[ - "BaseFormattedStringContent", - FlattenSentinel["BaseFormattedStringContent"], - RemovalSentinel, - ]: - return updated_node - - @mark_no_op - def leave_FormattedStringText( - self, original_node: "FormattedStringText", updated_node: "FormattedStringText" - ) -> Union[ - "BaseFormattedStringContent", - FlattenSentinel["BaseFormattedStringContent"], - RemovalSentinel, - ]: - return updated_node - - @mark_no_op - def leave_From(self, original_node: "From", updated_node: "From") -> "From": - return updated_node - - @mark_no_op - def leave_FunctionDef( - self, original_node: "FunctionDef", updated_node: "FunctionDef" - ) -> Union["BaseStatement", FlattenSentinel["BaseStatement"], RemovalSentinel]: - return updated_node - - @mark_no_op - def leave_GeneratorExp( - self, original_node: "GeneratorExp", updated_node: "GeneratorExp" - ) -> "BaseExpression": - return updated_node - - @mark_no_op - def leave_Global( - self, original_node: "Global", updated_node: "Global" - ) -> Union[ - "BaseSmallStatement", FlattenSentinel["BaseSmallStatement"], RemovalSentinel - ]: - return updated_node - - @mark_no_op - def leave_GreaterThan( - self, original_node: "GreaterThan", updated_node: "GreaterThan" - ) -> "BaseCompOp": - return updated_node - - @mark_no_op - def leave_GreaterThanEqual( - self, original_node: "GreaterThanEqual", updated_node: "GreaterThanEqual" - ) -> "BaseCompOp": - return updated_node - - @mark_no_op - def leave_If( - self, original_node: "If", updated_node: "If" - ) -> Union["BaseStatement", FlattenSentinel["BaseStatement"], RemovalSentinel]: - return updated_node - - @mark_no_op - def leave_IfExp( - self, original_node: "IfExp", updated_node: "IfExp" - ) -> "BaseExpression": - return updated_node - - @mark_no_op - def leave_Imaginary( - self, original_node: "Imaginary", updated_node: "Imaginary" - ) -> "BaseExpression": - return updated_node - - @mark_no_op - def leave_Import( - self, original_node: "Import", updated_node: "Import" - ) -> Union[ - "BaseSmallStatement", FlattenSentinel["BaseSmallStatement"], RemovalSentinel - ]: - return updated_node - - @mark_no_op - def leave_ImportAlias( - self, original_node: "ImportAlias", updated_node: "ImportAlias" - ) -> Union["ImportAlias", FlattenSentinel["ImportAlias"], RemovalSentinel]: - return updated_node - - @mark_no_op - def leave_ImportFrom( - self, original_node: "ImportFrom", updated_node: "ImportFrom" - ) -> Union[ - "BaseSmallStatement", FlattenSentinel["BaseSmallStatement"], RemovalSentinel - ]: - return updated_node - - @mark_no_op - def leave_ImportStar( - self, original_node: "ImportStar", updated_node: "ImportStar" - ) -> "ImportStar": - return updated_node - - @mark_no_op - def leave_In(self, original_node: "In", updated_node: "In") -> "BaseCompOp": - return updated_node - - @mark_no_op - def leave_IndentedBlock( - self, original_node: "IndentedBlock", updated_node: "IndentedBlock" - ) -> "BaseSuite": - return updated_node - - @mark_no_op - def leave_Index(self, original_node: "Index", updated_node: "Index") -> "BaseSlice": - return updated_node - - @mark_no_op - def leave_Integer( - self, original_node: "Integer", updated_node: "Integer" - ) -> "BaseExpression": - return updated_node - - @mark_no_op - def leave_Is(self, original_node: "Is", updated_node: "Is") -> "BaseCompOp": - return updated_node - - @mark_no_op - def leave_IsNot( - self, original_node: "IsNot", updated_node: "IsNot" - ) -> "BaseCompOp": - return updated_node - - @mark_no_op - def leave_Lambda( - self, original_node: "Lambda", updated_node: "Lambda" - ) -> "BaseExpression": - return updated_node - - @mark_no_op - def leave_LeftCurlyBrace( - self, original_node: "LeftCurlyBrace", updated_node: "LeftCurlyBrace" - ) -> "LeftCurlyBrace": - return updated_node - - @mark_no_op - def leave_LeftParen( - self, original_node: "LeftParen", updated_node: "LeftParen" - ) -> Union[ - "LeftParen", MaybeSentinel, FlattenSentinel["LeftParen"], RemovalSentinel - ]: - return updated_node - - @mark_no_op - def leave_LeftShift( - self, original_node: "LeftShift", updated_node: "LeftShift" - ) -> "BaseBinaryOp": - return updated_node - - @mark_no_op - def leave_LeftShiftAssign( - self, original_node: "LeftShiftAssign", updated_node: "LeftShiftAssign" - ) -> "BaseAugOp": - return updated_node - - @mark_no_op - def leave_LeftSquareBracket( - self, original_node: "LeftSquareBracket", updated_node: "LeftSquareBracket" - ) -> "LeftSquareBracket": - return updated_node - - @mark_no_op - def leave_LessThan( - self, original_node: "LessThan", updated_node: "LessThan" - ) -> "BaseCompOp": - return updated_node - - @mark_no_op - def leave_LessThanEqual( - self, original_node: "LessThanEqual", updated_node: "LessThanEqual" - ) -> "BaseCompOp": - return updated_node - - @mark_no_op - def leave_List( - self, original_node: "List", updated_node: "List" - ) -> "BaseExpression": - return updated_node - - @mark_no_op - def leave_ListComp( - self, original_node: "ListComp", updated_node: "ListComp" - ) -> "BaseExpression": - return updated_node - - @mark_no_op - def leave_Match( - self, original_node: "Match", updated_node: "Match" - ) -> Union["BaseStatement", FlattenSentinel["BaseStatement"], RemovalSentinel]: - return updated_node - - @mark_no_op - def leave_MatchAs( - self, original_node: "MatchAs", updated_node: "MatchAs" - ) -> "MatchPattern": - return updated_node - - @mark_no_op - def leave_MatchCase( - self, original_node: "MatchCase", updated_node: "MatchCase" - ) -> "MatchCase": - return updated_node - - @mark_no_op - def leave_MatchClass( - self, original_node: "MatchClass", updated_node: "MatchClass" - ) -> "MatchPattern": - return updated_node - - @mark_no_op - def leave_MatchKeywordElement( - self, original_node: "MatchKeywordElement", updated_node: "MatchKeywordElement" - ) -> Union[ - "MatchKeywordElement", FlattenSentinel["MatchKeywordElement"], RemovalSentinel - ]: - return updated_node - - @mark_no_op - def leave_MatchList( - self, original_node: "MatchList", updated_node: "MatchList" - ) -> "MatchPattern": - return updated_node - - @mark_no_op - def leave_MatchMapping( - self, original_node: "MatchMapping", updated_node: "MatchMapping" - ) -> "MatchPattern": - return updated_node - - @mark_no_op - def leave_MatchMappingElement( - self, original_node: "MatchMappingElement", updated_node: "MatchMappingElement" - ) -> Union[ - "MatchMappingElement", FlattenSentinel["MatchMappingElement"], RemovalSentinel - ]: - return updated_node - - @mark_no_op - def leave_MatchOr( - self, original_node: "MatchOr", updated_node: "MatchOr" - ) -> "MatchPattern": - return updated_node - - @mark_no_op - def leave_MatchOrElement( - self, original_node: "MatchOrElement", updated_node: "MatchOrElement" - ) -> Union["MatchOrElement", FlattenSentinel["MatchOrElement"], RemovalSentinel]: - return updated_node - - @mark_no_op - def leave_MatchPattern( - self, original_node: "MatchPattern", updated_node: "MatchPattern" - ) -> "MatchPattern": - return updated_node - - @mark_no_op - def leave_MatchSequence( - self, original_node: "MatchSequence", updated_node: "MatchSequence" - ) -> "MatchPattern": - return updated_node - - @mark_no_op - def leave_MatchSequenceElement( - self, - original_node: "MatchSequenceElement", - updated_node: "MatchSequenceElement", - ) -> Union[ - "MatchSequenceElement", FlattenSentinel["MatchSequenceElement"], RemovalSentinel - ]: - return updated_node - - @mark_no_op - def leave_MatchSingleton( - self, original_node: "MatchSingleton", updated_node: "MatchSingleton" - ) -> "MatchPattern": - return updated_node - - @mark_no_op - def leave_MatchStar( - self, original_node: "MatchStar", updated_node: "MatchStar" - ) -> "MatchStar": - return updated_node - - @mark_no_op - def leave_MatchTuple( - self, original_node: "MatchTuple", updated_node: "MatchTuple" - ) -> "MatchPattern": - return updated_node - - @mark_no_op - def leave_MatchValue( - self, original_node: "MatchValue", updated_node: "MatchValue" - ) -> "MatchPattern": - return updated_node - - @mark_no_op - def leave_MatrixMultiply( - self, original_node: "MatrixMultiply", updated_node: "MatrixMultiply" - ) -> "BaseBinaryOp": - return updated_node - - @mark_no_op - def leave_MatrixMultiplyAssign( - self, - original_node: "MatrixMultiplyAssign", - updated_node: "MatrixMultiplyAssign", - ) -> "BaseAugOp": - return updated_node - - @mark_no_op - def leave_Minus( - self, original_node: "Minus", updated_node: "Minus" - ) -> "BaseUnaryOp": - return updated_node - - @mark_no_op - def leave_Module(self, original_node: "Module", updated_node: "Module") -> "Module": - return updated_node - - @mark_no_op - def leave_Modulo( - self, original_node: "Modulo", updated_node: "Modulo" - ) -> "BaseBinaryOp": - return updated_node - - @mark_no_op - def leave_ModuloAssign( - self, original_node: "ModuloAssign", updated_node: "ModuloAssign" - ) -> "BaseAugOp": - return updated_node - - @mark_no_op - def leave_Multiply( - self, original_node: "Multiply", updated_node: "Multiply" - ) -> "BaseBinaryOp": - return updated_node - - @mark_no_op - def leave_MultiplyAssign( - self, original_node: "MultiplyAssign", updated_node: "MultiplyAssign" - ) -> "BaseAugOp": - return updated_node - - @mark_no_op - def leave_Name( - self, original_node: "Name", updated_node: "Name" - ) -> "BaseExpression": - return updated_node - - @mark_no_op - def leave_NameItem( - self, original_node: "NameItem", updated_node: "NameItem" - ) -> Union["NameItem", FlattenSentinel["NameItem"], RemovalSentinel]: - return updated_node - - @mark_no_op - def leave_NamedExpr( - self, original_node: "NamedExpr", updated_node: "NamedExpr" - ) -> "BaseExpression": - return updated_node - - @mark_no_op - def leave_Newline( - self, original_node: "Newline", updated_node: "Newline" - ) -> "Newline": - return updated_node - - @mark_no_op - def leave_Nonlocal( - self, original_node: "Nonlocal", updated_node: "Nonlocal" - ) -> Union[ - "BaseSmallStatement", FlattenSentinel["BaseSmallStatement"], RemovalSentinel - ]: - return updated_node - - @mark_no_op - def leave_Not(self, original_node: "Not", updated_node: "Not") -> "BaseUnaryOp": - return updated_node - - @mark_no_op - def leave_NotEqual( - self, original_node: "NotEqual", updated_node: "NotEqual" - ) -> "BaseCompOp": - return updated_node - - @mark_no_op - def leave_NotIn( - self, original_node: "NotIn", updated_node: "NotIn" - ) -> "BaseCompOp": - return updated_node - - @mark_no_op - def leave_Or(self, original_node: "Or", updated_node: "Or") -> "BaseBooleanOp": - return updated_node - - @mark_no_op - def leave_Param( - self, original_node: "Param", updated_node: "Param" - ) -> Union["Param", MaybeSentinel, FlattenSentinel["Param"], RemovalSentinel]: - return updated_node - - @mark_no_op - def leave_ParamSlash( - self, original_node: "ParamSlash", updated_node: "ParamSlash" - ) -> Union["ParamSlash", MaybeSentinel]: - return updated_node - - @mark_no_op - def leave_ParamSpec( - self, original_node: "ParamSpec", updated_node: "ParamSpec" - ) -> "ParamSpec": - return updated_node - - @mark_no_op - def leave_ParamStar( - self, original_node: "ParamStar", updated_node: "ParamStar" - ) -> Union["ParamStar", MaybeSentinel]: - return updated_node - - @mark_no_op - def leave_Parameters( - self, original_node: "Parameters", updated_node: "Parameters" - ) -> "Parameters": - return updated_node - - @mark_no_op - def leave_ParenthesizedWhitespace( - self, - original_node: "ParenthesizedWhitespace", - updated_node: "ParenthesizedWhitespace", - ) -> Union["BaseParenthesizableWhitespace", MaybeSentinel]: - return updated_node - - @mark_no_op - def leave_Pass( - self, original_node: "Pass", updated_node: "Pass" - ) -> Union[ - "BaseSmallStatement", FlattenSentinel["BaseSmallStatement"], RemovalSentinel - ]: - return updated_node - - @mark_no_op - def leave_Plus(self, original_node: "Plus", updated_node: "Plus") -> "BaseUnaryOp": - return updated_node - - @mark_no_op - def leave_Power( - self, original_node: "Power", updated_node: "Power" - ) -> "BaseBinaryOp": - return updated_node - - @mark_no_op - def leave_PowerAssign( - self, original_node: "PowerAssign", updated_node: "PowerAssign" - ) -> "BaseAugOp": - return updated_node - - @mark_no_op - def leave_Raise( - self, original_node: "Raise", updated_node: "Raise" - ) -> Union[ - "BaseSmallStatement", FlattenSentinel["BaseSmallStatement"], RemovalSentinel - ]: - return updated_node - - @mark_no_op - def leave_Return( - self, original_node: "Return", updated_node: "Return" - ) -> Union[ - "BaseSmallStatement", FlattenSentinel["BaseSmallStatement"], RemovalSentinel - ]: - return updated_node - - @mark_no_op - def leave_RightCurlyBrace( - self, original_node: "RightCurlyBrace", updated_node: "RightCurlyBrace" - ) -> "RightCurlyBrace": - return updated_node - - @mark_no_op - def leave_RightParen( - self, original_node: "RightParen", updated_node: "RightParen" - ) -> Union[ - "RightParen", MaybeSentinel, FlattenSentinel["RightParen"], RemovalSentinel - ]: - return updated_node - - @mark_no_op - def leave_RightShift( - self, original_node: "RightShift", updated_node: "RightShift" - ) -> "BaseBinaryOp": - return updated_node - - @mark_no_op - def leave_RightShiftAssign( - self, original_node: "RightShiftAssign", updated_node: "RightShiftAssign" - ) -> "BaseAugOp": - return updated_node - - @mark_no_op - def leave_RightSquareBracket( - self, original_node: "RightSquareBracket", updated_node: "RightSquareBracket" - ) -> "RightSquareBracket": - return updated_node - - @mark_no_op - def leave_Semicolon( - self, original_node: "Semicolon", updated_node: "Semicolon" - ) -> Union["Semicolon", MaybeSentinel]: - return updated_node - - @mark_no_op - def leave_Set(self, original_node: "Set", updated_node: "Set") -> "BaseExpression": - return updated_node - - @mark_no_op - def leave_SetComp( - self, original_node: "SetComp", updated_node: "SetComp" - ) -> "BaseExpression": - return updated_node - - @mark_no_op - def leave_SimpleStatementLine( - self, original_node: "SimpleStatementLine", updated_node: "SimpleStatementLine" - ) -> Union["BaseStatement", FlattenSentinel["BaseStatement"], RemovalSentinel]: - return updated_node - - @mark_no_op - def leave_SimpleStatementSuite( - self, - original_node: "SimpleStatementSuite", - updated_node: "SimpleStatementSuite", - ) -> "BaseSuite": - return updated_node - - @mark_no_op - def leave_SimpleString( - self, original_node: "SimpleString", updated_node: "SimpleString" - ) -> "BaseExpression": - return updated_node - - @mark_no_op - def leave_SimpleWhitespace( - self, original_node: "SimpleWhitespace", updated_node: "SimpleWhitespace" - ) -> Union["BaseParenthesizableWhitespace", MaybeSentinel]: - return updated_node - - @mark_no_op - def leave_Slice(self, original_node: "Slice", updated_node: "Slice") -> "BaseSlice": - return updated_node - - @mark_no_op - def leave_StarredDictElement( - self, original_node: "StarredDictElement", updated_node: "StarredDictElement" - ) -> Union["BaseDictElement", FlattenSentinel["BaseDictElement"], RemovalSentinel]: - return updated_node - - @mark_no_op - def leave_StarredElement( - self, original_node: "StarredElement", updated_node: "StarredElement" - ) -> "BaseExpression": - return updated_node - - @mark_no_op - def leave_Subscript( - self, original_node: "Subscript", updated_node: "Subscript" - ) -> "BaseExpression": - return updated_node - - @mark_no_op - def leave_SubscriptElement( - self, original_node: "SubscriptElement", updated_node: "SubscriptElement" - ) -> Union[ - "SubscriptElement", FlattenSentinel["SubscriptElement"], RemovalSentinel - ]: - return updated_node - - @mark_no_op - def leave_Subtract( - self, original_node: "Subtract", updated_node: "Subtract" - ) -> "BaseBinaryOp": - return updated_node - - @mark_no_op - def leave_SubtractAssign( - self, original_node: "SubtractAssign", updated_node: "SubtractAssign" - ) -> "BaseAugOp": - return updated_node - - @mark_no_op - def leave_TrailingWhitespace( - self, original_node: "TrailingWhitespace", updated_node: "TrailingWhitespace" - ) -> "TrailingWhitespace": - return updated_node - - @mark_no_op - def leave_Try( - self, original_node: "Try", updated_node: "Try" - ) -> Union["BaseStatement", FlattenSentinel["BaseStatement"], RemovalSentinel]: - return updated_node - - @mark_no_op - def leave_TryStar( - self, original_node: "TryStar", updated_node: "TryStar" - ) -> Union["BaseStatement", FlattenSentinel["BaseStatement"], RemovalSentinel]: - return updated_node - - @mark_no_op - def leave_Tuple( - self, original_node: "Tuple", updated_node: "Tuple" - ) -> "BaseExpression": - return updated_node - - @mark_no_op - def leave_TypeAlias( - self, original_node: "TypeAlias", updated_node: "TypeAlias" - ) -> Union[ - "BaseSmallStatement", FlattenSentinel["BaseSmallStatement"], RemovalSentinel - ]: - return updated_node - - @mark_no_op - def leave_TypeParam( - self, original_node: "TypeParam", updated_node: "TypeParam" - ) -> Union["TypeParam", FlattenSentinel["TypeParam"], RemovalSentinel]: - return updated_node - - @mark_no_op - def leave_TypeParameters( - self, original_node: "TypeParameters", updated_node: "TypeParameters" - ) -> "TypeParameters": - return updated_node - - @mark_no_op - def leave_TypeVar( - self, original_node: "TypeVar", updated_node: "TypeVar" - ) -> "TypeVar": - return updated_node - - @mark_no_op - def leave_TypeVarTuple( - self, original_node: "TypeVarTuple", updated_node: "TypeVarTuple" - ) -> "TypeVarTuple": - return updated_node - - @mark_no_op - def leave_UnaryOperation( - self, original_node: "UnaryOperation", updated_node: "UnaryOperation" - ) -> "BaseExpression": - return updated_node - - @mark_no_op - def leave_While( - self, original_node: "While", updated_node: "While" - ) -> Union["BaseStatement", FlattenSentinel["BaseStatement"], RemovalSentinel]: - return updated_node - - @mark_no_op - def leave_With( - self, original_node: "With", updated_node: "With" - ) -> Union["BaseStatement", FlattenSentinel["BaseStatement"], RemovalSentinel]: - return updated_node - - @mark_no_op - def leave_WithItem( - self, original_node: "WithItem", updated_node: "WithItem" - ) -> Union["WithItem", FlattenSentinel["WithItem"], RemovalSentinel]: - return updated_node - - @mark_no_op - def leave_Yield( - self, original_node: "Yield", updated_node: "Yield" - ) -> "BaseExpression": - return updated_node +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under the MIT license found in the +# LICENSE file in the root directory of this source tree. + + +# This file was generated by libcst.codegen.gen_matcher_classes +from typing import Optional, TYPE_CHECKING, Union + +from libcst._flatten_sentinel import FlattenSentinel +from libcst._maybe_sentinel import MaybeSentinel +from libcst._removal_sentinel import RemovalSentinel +from libcst._typed_visitor_base import mark_no_op + +if TYPE_CHECKING: + from libcst._nodes.expression import ( # noqa: F401 + Annotation, + Arg, + Asynchronous, + Attribute, + Await, + BaseDictElement, + BaseElement, + BaseExpression, + BaseFormattedStringContent, + BaseSlice, + BinaryOperation, + BooleanOperation, + Call, + Comparison, + ComparisonTarget, + CompFor, + CompIf, + ConcatenatedString, + Dict, + DictComp, + DictElement, + Element, + Ellipsis, + Float, + FormattedString, + FormattedStringExpression, + FormattedStringText, + From, + GeneratorExp, + IfExp, + Imaginary, + Index, + Integer, + Lambda, + LeftCurlyBrace, + LeftParen, + LeftSquareBracket, + List, + ListComp, + Name, + NamedExpr, + Param, + Parameters, + ParamSlash, + ParamStar, + RightCurlyBrace, + RightParen, + RightSquareBracket, + Set, + SetComp, + SimpleString, + Slice, + StarredDictElement, + StarredElement, + Subscript, + SubscriptElement, + Tuple, + UnaryOperation, + Yield, + ) + from libcst._nodes.module import ( # noqa: F401 + Module, + ) + from libcst._nodes.op import ( # noqa: F401 + Add, + AddAssign, + And, + AssignEqual, + BaseAugOp, + BaseBinaryOp, + BaseBooleanOp, + BaseCompOp, + BaseUnaryOp, + BitAnd, + BitAndAssign, + BitInvert, + BitOr, + BitOrAssign, + BitXor, + BitXorAssign, + Colon, + Comma, + Divide, + DivideAssign, + Dot, + Equal, + FloorDivide, + FloorDivideAssign, + GreaterThan, + GreaterThanEqual, + ImportStar, + In, + Is, + IsNot, + LeftShift, + LeftShiftAssign, + LessThan, + LessThanEqual, + MatrixMultiply, + MatrixMultiplyAssign, + Minus, + Modulo, + ModuloAssign, + Multiply, + MultiplyAssign, + Not, + NotEqual, + NotIn, + Or, + Plus, + Power, + PowerAssign, + RightShift, + RightShiftAssign, + Semicolon, + Subtract, + SubtractAssign, + ) + from libcst._nodes.statement import ( # noqa: F401 + AnnAssign, + AsName, + Assert, + Assign, + AssignTarget, + AugAssign, + BaseSmallStatement, + BaseStatement, + BaseSuite, + Break, + ClassDef, + Continue, + Decorator, + Del, + Else, + ExceptHandler, + ExceptStarHandler, + Expr, + Finally, + For, + FunctionDef, + Global, + If, + Import, + ImportAlias, + ImportFrom, + IndentedBlock, + Match, + MatchAs, + MatchCase, + MatchClass, + MatchKeywordElement, + MatchList, + MatchMapping, + MatchMappingElement, + MatchOr, + MatchOrElement, + MatchPattern, + MatchSequence, + MatchSequenceElement, + MatchSingleton, + MatchStar, + MatchTuple, + MatchValue, + NameItem, + Nonlocal, + ParamSpec, + Pass, + Raise, + Return, + SimpleStatementLine, + SimpleStatementSuite, + Try, + TryStar, + TypeAlias, + TypeParam, + TypeParameters, + TypeVar, + TypeVarTuple, + While, + With, + WithItem, + ) + from libcst._nodes.whitespace import ( # noqa: F401 + BaseParenthesizableWhitespace, + Comment, + EmptyLine, + Newline, + ParenthesizedWhitespace, + SimpleWhitespace, + TrailingWhitespace, + ) + + +class CSTTypedBaseFunctions: + @mark_no_op + def visit_Add(self, node: "Add") -> Optional[bool]: + pass + + @mark_no_op + def visit_Add_whitespace_before(self, node: "Add") -> None: + pass + + @mark_no_op + def leave_Add_whitespace_before(self, node: "Add") -> None: + pass + + @mark_no_op + def visit_Add_whitespace_after(self, node: "Add") -> None: + pass + + @mark_no_op + def leave_Add_whitespace_after(self, node: "Add") -> None: + pass + + @mark_no_op + def visit_AddAssign(self, node: "AddAssign") -> Optional[bool]: + pass + + @mark_no_op + def visit_AddAssign_whitespace_before(self, node: "AddAssign") -> None: + pass + + @mark_no_op + def leave_AddAssign_whitespace_before(self, node: "AddAssign") -> None: + pass + + @mark_no_op + def visit_AddAssign_whitespace_after(self, node: "AddAssign") -> None: + pass + + @mark_no_op + def leave_AddAssign_whitespace_after(self, node: "AddAssign") -> None: + pass + + @mark_no_op + def visit_And(self, node: "And") -> Optional[bool]: + pass + + @mark_no_op + def visit_And_whitespace_before(self, node: "And") -> None: + pass + + @mark_no_op + def leave_And_whitespace_before(self, node: "And") -> None: + pass + + @mark_no_op + def visit_And_whitespace_after(self, node: "And") -> None: + pass + + @mark_no_op + def leave_And_whitespace_after(self, node: "And") -> None: + pass + + @mark_no_op + def visit_AnnAssign(self, node: "AnnAssign") -> Optional[bool]: + pass + + @mark_no_op + def visit_AnnAssign_target(self, node: "AnnAssign") -> None: + pass + + @mark_no_op + def leave_AnnAssign_target(self, node: "AnnAssign") -> None: + pass + + @mark_no_op + def visit_AnnAssign_annotation(self, node: "AnnAssign") -> None: + pass + + @mark_no_op + def leave_AnnAssign_annotation(self, node: "AnnAssign") -> None: + pass + + @mark_no_op + def visit_AnnAssign_value(self, node: "AnnAssign") -> None: + pass + + @mark_no_op + def leave_AnnAssign_value(self, node: "AnnAssign") -> None: + pass + + @mark_no_op + def visit_AnnAssign_equal(self, node: "AnnAssign") -> None: + pass + + @mark_no_op + def leave_AnnAssign_equal(self, node: "AnnAssign") -> None: + pass + + @mark_no_op + def visit_AnnAssign_semicolon(self, node: "AnnAssign") -> None: + pass + + @mark_no_op + def leave_AnnAssign_semicolon(self, node: "AnnAssign") -> None: + pass + + @mark_no_op + def visit_Annotation(self, node: "Annotation") -> Optional[bool]: + pass + + @mark_no_op + def visit_Annotation_annotation(self, node: "Annotation") -> None: + pass + + @mark_no_op + def leave_Annotation_annotation(self, node: "Annotation") -> None: + pass + + @mark_no_op + def visit_Annotation_whitespace_before_indicator(self, node: "Annotation") -> None: + pass + + @mark_no_op + def leave_Annotation_whitespace_before_indicator(self, node: "Annotation") -> None: + pass + + @mark_no_op + def visit_Annotation_whitespace_after_indicator(self, node: "Annotation") -> None: + pass + + @mark_no_op + def leave_Annotation_whitespace_after_indicator(self, node: "Annotation") -> None: + pass + + @mark_no_op + def visit_Arg(self, node: "Arg") -> Optional[bool]: + pass + + @mark_no_op + def visit_Arg_value(self, node: "Arg") -> None: + pass + + @mark_no_op + def leave_Arg_value(self, node: "Arg") -> None: + pass + + @mark_no_op + def visit_Arg_keyword(self, node: "Arg") -> None: + pass + + @mark_no_op + def leave_Arg_keyword(self, node: "Arg") -> None: + pass + + @mark_no_op + def visit_Arg_equal(self, node: "Arg") -> None: + pass + + @mark_no_op + def leave_Arg_equal(self, node: "Arg") -> None: + pass + + @mark_no_op + def visit_Arg_comma(self, node: "Arg") -> None: + pass + + @mark_no_op + def leave_Arg_comma(self, node: "Arg") -> None: + pass + + @mark_no_op + def visit_Arg_star(self, node: "Arg") -> None: + pass + + @mark_no_op + def leave_Arg_star(self, node: "Arg") -> None: + pass + + @mark_no_op + def visit_Arg_whitespace_after_star(self, node: "Arg") -> None: + pass + + @mark_no_op + def leave_Arg_whitespace_after_star(self, node: "Arg") -> None: + pass + + @mark_no_op + def visit_Arg_whitespace_after_arg(self, node: "Arg") -> None: + pass + + @mark_no_op + def leave_Arg_whitespace_after_arg(self, node: "Arg") -> None: + pass + + @mark_no_op + def visit_AsName(self, node: "AsName") -> Optional[bool]: + pass + + @mark_no_op + def visit_AsName_name(self, node: "AsName") -> None: + pass + + @mark_no_op + def leave_AsName_name(self, node: "AsName") -> None: + pass + + @mark_no_op + def visit_AsName_whitespace_before_as(self, node: "AsName") -> None: + pass + + @mark_no_op + def leave_AsName_whitespace_before_as(self, node: "AsName") -> None: + pass + + @mark_no_op + def visit_AsName_whitespace_after_as(self, node: "AsName") -> None: + pass + + @mark_no_op + def leave_AsName_whitespace_after_as(self, node: "AsName") -> None: + pass + + @mark_no_op + def visit_Assert(self, node: "Assert") -> Optional[bool]: + pass + + @mark_no_op + def visit_Assert_test(self, node: "Assert") -> None: + pass + + @mark_no_op + def leave_Assert_test(self, node: "Assert") -> None: + pass + + @mark_no_op + def visit_Assert_msg(self, node: "Assert") -> None: + pass + + @mark_no_op + def leave_Assert_msg(self, node: "Assert") -> None: + pass + + @mark_no_op + def visit_Assert_comma(self, node: "Assert") -> None: + pass + + @mark_no_op + def leave_Assert_comma(self, node: "Assert") -> None: + pass + + @mark_no_op + def visit_Assert_whitespace_after_assert(self, node: "Assert") -> None: + pass + + @mark_no_op + def leave_Assert_whitespace_after_assert(self, node: "Assert") -> None: + pass + + @mark_no_op + def visit_Assert_semicolon(self, node: "Assert") -> None: + pass + + @mark_no_op + def leave_Assert_semicolon(self, node: "Assert") -> None: + pass + + @mark_no_op + def visit_Assign(self, node: "Assign") -> Optional[bool]: + pass + + @mark_no_op + def visit_Assign_targets(self, node: "Assign") -> None: + pass + + @mark_no_op + def leave_Assign_targets(self, node: "Assign") -> None: + pass + + @mark_no_op + def visit_Assign_value(self, node: "Assign") -> None: + pass + + @mark_no_op + def leave_Assign_value(self, node: "Assign") -> None: + pass + + @mark_no_op + def visit_Assign_semicolon(self, node: "Assign") -> None: + pass + + @mark_no_op + def leave_Assign_semicolon(self, node: "Assign") -> None: + pass + + @mark_no_op + def visit_AssignEqual(self, node: "AssignEqual") -> Optional[bool]: + pass + + @mark_no_op + def visit_AssignEqual_whitespace_before(self, node: "AssignEqual") -> None: + pass + + @mark_no_op + def leave_AssignEqual_whitespace_before(self, node: "AssignEqual") -> None: + pass + + @mark_no_op + def visit_AssignEqual_whitespace_after(self, node: "AssignEqual") -> None: + pass + + @mark_no_op + def leave_AssignEqual_whitespace_after(self, node: "AssignEqual") -> None: + pass + + @mark_no_op + def visit_AssignTarget(self, node: "AssignTarget") -> Optional[bool]: + pass + + @mark_no_op + def visit_AssignTarget_target(self, node: "AssignTarget") -> None: + pass + + @mark_no_op + def leave_AssignTarget_target(self, node: "AssignTarget") -> None: + pass + + @mark_no_op + def visit_AssignTarget_whitespace_before_equal(self, node: "AssignTarget") -> None: + pass + + @mark_no_op + def leave_AssignTarget_whitespace_before_equal(self, node: "AssignTarget") -> None: + pass + + @mark_no_op + def visit_AssignTarget_whitespace_after_equal(self, node: "AssignTarget") -> None: + pass + + @mark_no_op + def leave_AssignTarget_whitespace_after_equal(self, node: "AssignTarget") -> None: + pass + + @mark_no_op + def visit_Asynchronous(self, node: "Asynchronous") -> Optional[bool]: + pass + + @mark_no_op + def visit_Asynchronous_whitespace_after(self, node: "Asynchronous") -> None: + pass + + @mark_no_op + def leave_Asynchronous_whitespace_after(self, node: "Asynchronous") -> None: + pass + + @mark_no_op + def visit_Attribute(self, node: "Attribute") -> Optional[bool]: + pass + + @mark_no_op + def visit_Attribute_value(self, node: "Attribute") -> None: + pass + + @mark_no_op + def leave_Attribute_value(self, node: "Attribute") -> None: + pass + + @mark_no_op + def visit_Attribute_attr(self, node: "Attribute") -> None: + pass + + @mark_no_op + def leave_Attribute_attr(self, node: "Attribute") -> None: + pass + + @mark_no_op + def visit_Attribute_dot(self, node: "Attribute") -> None: + pass + + @mark_no_op + def leave_Attribute_dot(self, node: "Attribute") -> None: + pass + + @mark_no_op + def visit_Attribute_lpar(self, node: "Attribute") -> None: + pass + + @mark_no_op + def leave_Attribute_lpar(self, node: "Attribute") -> None: + pass + + @mark_no_op + def visit_Attribute_rpar(self, node: "Attribute") -> None: + pass + + @mark_no_op + def leave_Attribute_rpar(self, node: "Attribute") -> None: + pass + + @mark_no_op + def visit_AugAssign(self, node: "AugAssign") -> Optional[bool]: + pass + + @mark_no_op + def visit_AugAssign_target(self, node: "AugAssign") -> None: + pass + + @mark_no_op + def leave_AugAssign_target(self, node: "AugAssign") -> None: + pass + + @mark_no_op + def visit_AugAssign_operator(self, node: "AugAssign") -> None: + pass + + @mark_no_op + def leave_AugAssign_operator(self, node: "AugAssign") -> None: + pass + + @mark_no_op + def visit_AugAssign_value(self, node: "AugAssign") -> None: + pass + + @mark_no_op + def leave_AugAssign_value(self, node: "AugAssign") -> None: + pass + + @mark_no_op + def visit_AugAssign_semicolon(self, node: "AugAssign") -> None: + pass + + @mark_no_op + def leave_AugAssign_semicolon(self, node: "AugAssign") -> None: + pass + + @mark_no_op + def visit_Await(self, node: "Await") -> Optional[bool]: + pass + + @mark_no_op + def visit_Await_expression(self, node: "Await") -> None: + pass + + @mark_no_op + def leave_Await_expression(self, node: "Await") -> None: + pass + + @mark_no_op + def visit_Await_lpar(self, node: "Await") -> None: + pass + + @mark_no_op + def leave_Await_lpar(self, node: "Await") -> None: + pass + + @mark_no_op + def visit_Await_rpar(self, node: "Await") -> None: + pass + + @mark_no_op + def leave_Await_rpar(self, node: "Await") -> None: + pass + + @mark_no_op + def visit_Await_whitespace_after_await(self, node: "Await") -> None: + pass + + @mark_no_op + def leave_Await_whitespace_after_await(self, node: "Await") -> None: + pass + + @mark_no_op + def visit_BinaryOperation(self, node: "BinaryOperation") -> Optional[bool]: + pass + + @mark_no_op + def visit_BinaryOperation_left(self, node: "BinaryOperation") -> None: + pass + + @mark_no_op + def leave_BinaryOperation_left(self, node: "BinaryOperation") -> None: + pass + + @mark_no_op + def visit_BinaryOperation_operator(self, node: "BinaryOperation") -> None: + pass + + @mark_no_op + def leave_BinaryOperation_operator(self, node: "BinaryOperation") -> None: + pass + + @mark_no_op + def visit_BinaryOperation_right(self, node: "BinaryOperation") -> None: + pass + + @mark_no_op + def leave_BinaryOperation_right(self, node: "BinaryOperation") -> None: + pass + + @mark_no_op + def visit_BinaryOperation_lpar(self, node: "BinaryOperation") -> None: + pass + + @mark_no_op + def leave_BinaryOperation_lpar(self, node: "BinaryOperation") -> None: + pass + + @mark_no_op + def visit_BinaryOperation_rpar(self, node: "BinaryOperation") -> None: + pass + + @mark_no_op + def leave_BinaryOperation_rpar(self, node: "BinaryOperation") -> None: + pass + + @mark_no_op + def visit_BitAnd(self, node: "BitAnd") -> Optional[bool]: + pass + + @mark_no_op + def visit_BitAnd_whitespace_before(self, node: "BitAnd") -> None: + pass + + @mark_no_op + def leave_BitAnd_whitespace_before(self, node: "BitAnd") -> None: + pass + + @mark_no_op + def visit_BitAnd_whitespace_after(self, node: "BitAnd") -> None: + pass + + @mark_no_op + def leave_BitAnd_whitespace_after(self, node: "BitAnd") -> None: + pass + + @mark_no_op + def visit_BitAndAssign(self, node: "BitAndAssign") -> Optional[bool]: + pass + + @mark_no_op + def visit_BitAndAssign_whitespace_before(self, node: "BitAndAssign") -> None: + pass + + @mark_no_op + def leave_BitAndAssign_whitespace_before(self, node: "BitAndAssign") -> None: + pass + + @mark_no_op + def visit_BitAndAssign_whitespace_after(self, node: "BitAndAssign") -> None: + pass + + @mark_no_op + def leave_BitAndAssign_whitespace_after(self, node: "BitAndAssign") -> None: + pass + + @mark_no_op + def visit_BitInvert(self, node: "BitInvert") -> Optional[bool]: + pass + + @mark_no_op + def visit_BitInvert_whitespace_after(self, node: "BitInvert") -> None: + pass + + @mark_no_op + def leave_BitInvert_whitespace_after(self, node: "BitInvert") -> None: + pass + + @mark_no_op + def visit_BitOr(self, node: "BitOr") -> Optional[bool]: + pass + + @mark_no_op + def visit_BitOr_whitespace_before(self, node: "BitOr") -> None: + pass + + @mark_no_op + def leave_BitOr_whitespace_before(self, node: "BitOr") -> None: + pass + + @mark_no_op + def visit_BitOr_whitespace_after(self, node: "BitOr") -> None: + pass + + @mark_no_op + def leave_BitOr_whitespace_after(self, node: "BitOr") -> None: + pass + + @mark_no_op + def visit_BitOrAssign(self, node: "BitOrAssign") -> Optional[bool]: + pass + + @mark_no_op + def visit_BitOrAssign_whitespace_before(self, node: "BitOrAssign") -> None: + pass + + @mark_no_op + def leave_BitOrAssign_whitespace_before(self, node: "BitOrAssign") -> None: + pass + + @mark_no_op + def visit_BitOrAssign_whitespace_after(self, node: "BitOrAssign") -> None: + pass + + @mark_no_op + def leave_BitOrAssign_whitespace_after(self, node: "BitOrAssign") -> None: + pass + + @mark_no_op + def visit_BitXor(self, node: "BitXor") -> Optional[bool]: + pass + + @mark_no_op + def visit_BitXor_whitespace_before(self, node: "BitXor") -> None: + pass + + @mark_no_op + def leave_BitXor_whitespace_before(self, node: "BitXor") -> None: + pass + + @mark_no_op + def visit_BitXor_whitespace_after(self, node: "BitXor") -> None: + pass + + @mark_no_op + def leave_BitXor_whitespace_after(self, node: "BitXor") -> None: + pass + + @mark_no_op + def visit_BitXorAssign(self, node: "BitXorAssign") -> Optional[bool]: + pass + + @mark_no_op + def visit_BitXorAssign_whitespace_before(self, node: "BitXorAssign") -> None: + pass + + @mark_no_op + def leave_BitXorAssign_whitespace_before(self, node: "BitXorAssign") -> None: + pass + + @mark_no_op + def visit_BitXorAssign_whitespace_after(self, node: "BitXorAssign") -> None: + pass + + @mark_no_op + def leave_BitXorAssign_whitespace_after(self, node: "BitXorAssign") -> None: + pass + + @mark_no_op + def visit_BooleanOperation(self, node: "BooleanOperation") -> Optional[bool]: + pass + + @mark_no_op + def visit_BooleanOperation_left(self, node: "BooleanOperation") -> None: + pass + + @mark_no_op + def leave_BooleanOperation_left(self, node: "BooleanOperation") -> None: + pass + + @mark_no_op + def visit_BooleanOperation_operator(self, node: "BooleanOperation") -> None: + pass + + @mark_no_op + def leave_BooleanOperation_operator(self, node: "BooleanOperation") -> None: + pass + + @mark_no_op + def visit_BooleanOperation_right(self, node: "BooleanOperation") -> None: + pass + + @mark_no_op + def leave_BooleanOperation_right(self, node: "BooleanOperation") -> None: + pass + + @mark_no_op + def visit_BooleanOperation_lpar(self, node: "BooleanOperation") -> None: + pass + + @mark_no_op + def leave_BooleanOperation_lpar(self, node: "BooleanOperation") -> None: + pass + + @mark_no_op + def visit_BooleanOperation_rpar(self, node: "BooleanOperation") -> None: + pass + + @mark_no_op + def leave_BooleanOperation_rpar(self, node: "BooleanOperation") -> None: + pass + + @mark_no_op + def visit_Break(self, node: "Break") -> Optional[bool]: + pass + + @mark_no_op + def visit_Break_semicolon(self, node: "Break") -> None: + pass + + @mark_no_op + def leave_Break_semicolon(self, node: "Break") -> None: + pass + + @mark_no_op + def visit_Call(self, node: "Call") -> Optional[bool]: + pass + + @mark_no_op + def visit_Call_func(self, node: "Call") -> None: + pass + + @mark_no_op + def leave_Call_func(self, node: "Call") -> None: + pass + + @mark_no_op + def visit_Call_args(self, node: "Call") -> None: + pass + + @mark_no_op + def leave_Call_args(self, node: "Call") -> None: + pass + + @mark_no_op + def visit_Call_lpar(self, node: "Call") -> None: + pass + + @mark_no_op + def leave_Call_lpar(self, node: "Call") -> None: + pass + + @mark_no_op + def visit_Call_rpar(self, node: "Call") -> None: + pass + + @mark_no_op + def leave_Call_rpar(self, node: "Call") -> None: + pass + + @mark_no_op + def visit_Call_whitespace_after_func(self, node: "Call") -> None: + pass + + @mark_no_op + def leave_Call_whitespace_after_func(self, node: "Call") -> None: + pass + + @mark_no_op + def visit_Call_whitespace_before_args(self, node: "Call") -> None: + pass + + @mark_no_op + def leave_Call_whitespace_before_args(self, node: "Call") -> None: + pass + + @mark_no_op + def visit_ClassDef(self, node: "ClassDef") -> Optional[bool]: + pass + + @mark_no_op + def visit_ClassDef_name(self, node: "ClassDef") -> None: + pass + + @mark_no_op + def leave_ClassDef_name(self, node: "ClassDef") -> None: + pass + + @mark_no_op + def visit_ClassDef_body(self, node: "ClassDef") -> None: + pass + + @mark_no_op + def leave_ClassDef_body(self, node: "ClassDef") -> None: + pass + + @mark_no_op + def visit_ClassDef_bases(self, node: "ClassDef") -> None: + pass + + @mark_no_op + def leave_ClassDef_bases(self, node: "ClassDef") -> None: + pass + + @mark_no_op + def visit_ClassDef_keywords(self, node: "ClassDef") -> None: + pass + + @mark_no_op + def leave_ClassDef_keywords(self, node: "ClassDef") -> None: + pass + + @mark_no_op + def visit_ClassDef_decorators(self, node: "ClassDef") -> None: + pass + + @mark_no_op + def leave_ClassDef_decorators(self, node: "ClassDef") -> None: + pass + + @mark_no_op + def visit_ClassDef_lpar(self, node: "ClassDef") -> None: + pass + + @mark_no_op + def leave_ClassDef_lpar(self, node: "ClassDef") -> None: + pass + + @mark_no_op + def visit_ClassDef_rpar(self, node: "ClassDef") -> None: + pass + + @mark_no_op + def leave_ClassDef_rpar(self, node: "ClassDef") -> None: + pass + + @mark_no_op + def visit_ClassDef_leading_lines(self, node: "ClassDef") -> None: + pass + + @mark_no_op + def leave_ClassDef_leading_lines(self, node: "ClassDef") -> None: + pass + + @mark_no_op + def visit_ClassDef_lines_after_decorators(self, node: "ClassDef") -> None: + pass + + @mark_no_op + def leave_ClassDef_lines_after_decorators(self, node: "ClassDef") -> None: + pass + + @mark_no_op + def visit_ClassDef_whitespace_after_class(self, node: "ClassDef") -> None: + pass + + @mark_no_op + def leave_ClassDef_whitespace_after_class(self, node: "ClassDef") -> None: + pass + + @mark_no_op + def visit_ClassDef_whitespace_after_name(self, node: "ClassDef") -> None: + pass + + @mark_no_op + def leave_ClassDef_whitespace_after_name(self, node: "ClassDef") -> None: + pass + + @mark_no_op + def visit_ClassDef_whitespace_before_colon(self, node: "ClassDef") -> None: + pass + + @mark_no_op + def leave_ClassDef_whitespace_before_colon(self, node: "ClassDef") -> None: + pass + + @mark_no_op + def visit_ClassDef_type_parameters(self, node: "ClassDef") -> None: + pass + + @mark_no_op + def leave_ClassDef_type_parameters(self, node: "ClassDef") -> None: + pass + + @mark_no_op + def visit_ClassDef_whitespace_after_type_parameters(self, node: "ClassDef") -> None: + pass + + @mark_no_op + def leave_ClassDef_whitespace_after_type_parameters(self, node: "ClassDef") -> None: + pass + + @mark_no_op + def visit_Colon(self, node: "Colon") -> Optional[bool]: + pass + + @mark_no_op + def visit_Colon_whitespace_before(self, node: "Colon") -> None: + pass + + @mark_no_op + def leave_Colon_whitespace_before(self, node: "Colon") -> None: + pass + + @mark_no_op + def visit_Colon_whitespace_after(self, node: "Colon") -> None: + pass + + @mark_no_op + def leave_Colon_whitespace_after(self, node: "Colon") -> None: + pass + + @mark_no_op + def visit_Comma(self, node: "Comma") -> Optional[bool]: + pass + + @mark_no_op + def visit_Comma_whitespace_before(self, node: "Comma") -> None: + pass + + @mark_no_op + def leave_Comma_whitespace_before(self, node: "Comma") -> None: + pass + + @mark_no_op + def visit_Comma_whitespace_after(self, node: "Comma") -> None: + pass + + @mark_no_op + def leave_Comma_whitespace_after(self, node: "Comma") -> None: + pass + + @mark_no_op + def visit_Comment(self, node: "Comment") -> Optional[bool]: + pass + + @mark_no_op + def visit_Comment_value(self, node: "Comment") -> None: + pass + + @mark_no_op + def leave_Comment_value(self, node: "Comment") -> None: + pass + + @mark_no_op + def visit_CompFor(self, node: "CompFor") -> Optional[bool]: + pass + + @mark_no_op + def visit_CompFor_target(self, node: "CompFor") -> None: + pass + + @mark_no_op + def leave_CompFor_target(self, node: "CompFor") -> None: + pass + + @mark_no_op + def visit_CompFor_iter(self, node: "CompFor") -> None: + pass + + @mark_no_op + def leave_CompFor_iter(self, node: "CompFor") -> None: + pass + + @mark_no_op + def visit_CompFor_ifs(self, node: "CompFor") -> None: + pass + + @mark_no_op + def leave_CompFor_ifs(self, node: "CompFor") -> None: + pass + + @mark_no_op + def visit_CompFor_inner_for_in(self, node: "CompFor") -> None: + pass + + @mark_no_op + def leave_CompFor_inner_for_in(self, node: "CompFor") -> None: + pass + + @mark_no_op + def visit_CompFor_asynchronous(self, node: "CompFor") -> None: + pass + + @mark_no_op + def leave_CompFor_asynchronous(self, node: "CompFor") -> None: + pass + + @mark_no_op + def visit_CompFor_whitespace_before(self, node: "CompFor") -> None: + pass + + @mark_no_op + def leave_CompFor_whitespace_before(self, node: "CompFor") -> None: + pass + + @mark_no_op + def visit_CompFor_whitespace_after_for(self, node: "CompFor") -> None: + pass + + @mark_no_op + def leave_CompFor_whitespace_after_for(self, node: "CompFor") -> None: + pass + + @mark_no_op + def visit_CompFor_whitespace_before_in(self, node: "CompFor") -> None: + pass + + @mark_no_op + def leave_CompFor_whitespace_before_in(self, node: "CompFor") -> None: + pass + + @mark_no_op + def visit_CompFor_whitespace_after_in(self, node: "CompFor") -> None: + pass + + @mark_no_op + def leave_CompFor_whitespace_after_in(self, node: "CompFor") -> None: + pass + + @mark_no_op + def visit_CompIf(self, node: "CompIf") -> Optional[bool]: + pass + + @mark_no_op + def visit_CompIf_test(self, node: "CompIf") -> None: + pass + + @mark_no_op + def leave_CompIf_test(self, node: "CompIf") -> None: + pass + + @mark_no_op + def visit_CompIf_whitespace_before(self, node: "CompIf") -> None: + pass + + @mark_no_op + def leave_CompIf_whitespace_before(self, node: "CompIf") -> None: + pass + + @mark_no_op + def visit_CompIf_whitespace_before_test(self, node: "CompIf") -> None: + pass + + @mark_no_op + def leave_CompIf_whitespace_before_test(self, node: "CompIf") -> None: + pass + + @mark_no_op + def visit_Comparison(self, node: "Comparison") -> Optional[bool]: + pass + + @mark_no_op + def visit_Comparison_left(self, node: "Comparison") -> None: + pass + + @mark_no_op + def leave_Comparison_left(self, node: "Comparison") -> None: + pass + + @mark_no_op + def visit_Comparison_comparisons(self, node: "Comparison") -> None: + pass + + @mark_no_op + def leave_Comparison_comparisons(self, node: "Comparison") -> None: + pass + + @mark_no_op + def visit_Comparison_lpar(self, node: "Comparison") -> None: + pass + + @mark_no_op + def leave_Comparison_lpar(self, node: "Comparison") -> None: + pass + + @mark_no_op + def visit_Comparison_rpar(self, node: "Comparison") -> None: + pass + + @mark_no_op + def leave_Comparison_rpar(self, node: "Comparison") -> None: + pass + + @mark_no_op + def visit_ComparisonTarget(self, node: "ComparisonTarget") -> Optional[bool]: + pass + + @mark_no_op + def visit_ComparisonTarget_operator(self, node: "ComparisonTarget") -> None: + pass + + @mark_no_op + def leave_ComparisonTarget_operator(self, node: "ComparisonTarget") -> None: + pass + + @mark_no_op + def visit_ComparisonTarget_comparator(self, node: "ComparisonTarget") -> None: + pass + + @mark_no_op + def leave_ComparisonTarget_comparator(self, node: "ComparisonTarget") -> None: + pass + + @mark_no_op + def visit_ConcatenatedString(self, node: "ConcatenatedString") -> Optional[bool]: + pass + + @mark_no_op + def visit_ConcatenatedString_left(self, node: "ConcatenatedString") -> None: + pass + + @mark_no_op + def leave_ConcatenatedString_left(self, node: "ConcatenatedString") -> None: + pass + + @mark_no_op + def visit_ConcatenatedString_right(self, node: "ConcatenatedString") -> None: + pass + + @mark_no_op + def leave_ConcatenatedString_right(self, node: "ConcatenatedString") -> None: + pass + + @mark_no_op + def visit_ConcatenatedString_lpar(self, node: "ConcatenatedString") -> None: + pass + + @mark_no_op + def leave_ConcatenatedString_lpar(self, node: "ConcatenatedString") -> None: + pass + + @mark_no_op + def visit_ConcatenatedString_rpar(self, node: "ConcatenatedString") -> None: + pass + + @mark_no_op + def leave_ConcatenatedString_rpar(self, node: "ConcatenatedString") -> None: + pass + + @mark_no_op + def visit_ConcatenatedString_whitespace_between( + self, node: "ConcatenatedString" + ) -> None: + pass + + @mark_no_op + def leave_ConcatenatedString_whitespace_between( + self, node: "ConcatenatedString" + ) -> None: + pass + + @mark_no_op + def visit_Continue(self, node: "Continue") -> Optional[bool]: + pass + + @mark_no_op + def visit_Continue_semicolon(self, node: "Continue") -> None: + pass + + @mark_no_op + def leave_Continue_semicolon(self, node: "Continue") -> None: + pass + + @mark_no_op + def visit_Decorator(self, node: "Decorator") -> Optional[bool]: + pass + + @mark_no_op + def visit_Decorator_decorator(self, node: "Decorator") -> None: + pass + + @mark_no_op + def leave_Decorator_decorator(self, node: "Decorator") -> None: + pass + + @mark_no_op + def visit_Decorator_leading_lines(self, node: "Decorator") -> None: + pass + + @mark_no_op + def leave_Decorator_leading_lines(self, node: "Decorator") -> None: + pass + + @mark_no_op + def visit_Decorator_whitespace_after_at(self, node: "Decorator") -> None: + pass + + @mark_no_op + def leave_Decorator_whitespace_after_at(self, node: "Decorator") -> None: + pass + + @mark_no_op + def visit_Decorator_trailing_whitespace(self, node: "Decorator") -> None: + pass + + @mark_no_op + def leave_Decorator_trailing_whitespace(self, node: "Decorator") -> None: + pass + + @mark_no_op + def visit_Del(self, node: "Del") -> Optional[bool]: + pass + + @mark_no_op + def visit_Del_target(self, node: "Del") -> None: + pass + + @mark_no_op + def leave_Del_target(self, node: "Del") -> None: + pass + + @mark_no_op + def visit_Del_whitespace_after_del(self, node: "Del") -> None: + pass + + @mark_no_op + def leave_Del_whitespace_after_del(self, node: "Del") -> None: + pass + + @mark_no_op + def visit_Del_semicolon(self, node: "Del") -> None: + pass + + @mark_no_op + def leave_Del_semicolon(self, node: "Del") -> None: + pass + + @mark_no_op + def visit_Dict(self, node: "Dict") -> Optional[bool]: + pass + + @mark_no_op + def visit_Dict_elements(self, node: "Dict") -> None: + pass + + @mark_no_op + def leave_Dict_elements(self, node: "Dict") -> None: + pass + + @mark_no_op + def visit_Dict_lbrace(self, node: "Dict") -> None: + pass + + @mark_no_op + def leave_Dict_lbrace(self, node: "Dict") -> None: + pass + + @mark_no_op + def visit_Dict_rbrace(self, node: "Dict") -> None: + pass + + @mark_no_op + def leave_Dict_rbrace(self, node: "Dict") -> None: + pass + + @mark_no_op + def visit_Dict_lpar(self, node: "Dict") -> None: + pass + + @mark_no_op + def leave_Dict_lpar(self, node: "Dict") -> None: + pass + + @mark_no_op + def visit_Dict_rpar(self, node: "Dict") -> None: + pass + + @mark_no_op + def leave_Dict_rpar(self, node: "Dict") -> None: + pass + + @mark_no_op + def visit_DictComp(self, node: "DictComp") -> Optional[bool]: + pass + + @mark_no_op + def visit_DictComp_key(self, node: "DictComp") -> None: + pass + + @mark_no_op + def leave_DictComp_key(self, node: "DictComp") -> None: + pass + + @mark_no_op + def visit_DictComp_value(self, node: "DictComp") -> None: + pass + + @mark_no_op + def leave_DictComp_value(self, node: "DictComp") -> None: + pass + + @mark_no_op + def visit_DictComp_for_in(self, node: "DictComp") -> None: + pass + + @mark_no_op + def leave_DictComp_for_in(self, node: "DictComp") -> None: + pass + + @mark_no_op + def visit_DictComp_lbrace(self, node: "DictComp") -> None: + pass + + @mark_no_op + def leave_DictComp_lbrace(self, node: "DictComp") -> None: + pass + + @mark_no_op + def visit_DictComp_rbrace(self, node: "DictComp") -> None: + pass + + @mark_no_op + def leave_DictComp_rbrace(self, node: "DictComp") -> None: + pass + + @mark_no_op + def visit_DictComp_lpar(self, node: "DictComp") -> None: + pass + + @mark_no_op + def leave_DictComp_lpar(self, node: "DictComp") -> None: + pass + + @mark_no_op + def visit_DictComp_rpar(self, node: "DictComp") -> None: + pass + + @mark_no_op + def leave_DictComp_rpar(self, node: "DictComp") -> None: + pass + + @mark_no_op + def visit_DictComp_whitespace_before_colon(self, node: "DictComp") -> None: + pass + + @mark_no_op + def leave_DictComp_whitespace_before_colon(self, node: "DictComp") -> None: + pass + + @mark_no_op + def visit_DictComp_whitespace_after_colon(self, node: "DictComp") -> None: + pass + + @mark_no_op + def leave_DictComp_whitespace_after_colon(self, node: "DictComp") -> None: + pass + + @mark_no_op + def visit_DictElement(self, node: "DictElement") -> Optional[bool]: + pass + + @mark_no_op + def visit_DictElement_key(self, node: "DictElement") -> None: + pass + + @mark_no_op + def leave_DictElement_key(self, node: "DictElement") -> None: + pass + + @mark_no_op + def visit_DictElement_value(self, node: "DictElement") -> None: + pass + + @mark_no_op + def leave_DictElement_value(self, node: "DictElement") -> None: + pass + + @mark_no_op + def visit_DictElement_comma(self, node: "DictElement") -> None: + pass + + @mark_no_op + def leave_DictElement_comma(self, node: "DictElement") -> None: + pass + + @mark_no_op + def visit_DictElement_whitespace_before_colon(self, node: "DictElement") -> None: + pass + + @mark_no_op + def leave_DictElement_whitespace_before_colon(self, node: "DictElement") -> None: + pass + + @mark_no_op + def visit_DictElement_whitespace_after_colon(self, node: "DictElement") -> None: + pass + + @mark_no_op + def leave_DictElement_whitespace_after_colon(self, node: "DictElement") -> None: + pass + + @mark_no_op + def visit_Divide(self, node: "Divide") -> Optional[bool]: + pass + + @mark_no_op + def visit_Divide_whitespace_before(self, node: "Divide") -> None: + pass + + @mark_no_op + def leave_Divide_whitespace_before(self, node: "Divide") -> None: + pass + + @mark_no_op + def visit_Divide_whitespace_after(self, node: "Divide") -> None: + pass + + @mark_no_op + def leave_Divide_whitespace_after(self, node: "Divide") -> None: + pass + + @mark_no_op + def visit_DivideAssign(self, node: "DivideAssign") -> Optional[bool]: + pass + + @mark_no_op + def visit_DivideAssign_whitespace_before(self, node: "DivideAssign") -> None: + pass + + @mark_no_op + def leave_DivideAssign_whitespace_before(self, node: "DivideAssign") -> None: + pass + + @mark_no_op + def visit_DivideAssign_whitespace_after(self, node: "DivideAssign") -> None: + pass + + @mark_no_op + def leave_DivideAssign_whitespace_after(self, node: "DivideAssign") -> None: + pass + + @mark_no_op + def visit_Dot(self, node: "Dot") -> Optional[bool]: + pass + + @mark_no_op + def visit_Dot_whitespace_before(self, node: "Dot") -> None: + pass + + @mark_no_op + def leave_Dot_whitespace_before(self, node: "Dot") -> None: + pass + + @mark_no_op + def visit_Dot_whitespace_after(self, node: "Dot") -> None: + pass + + @mark_no_op + def leave_Dot_whitespace_after(self, node: "Dot") -> None: + pass + + @mark_no_op + def visit_Element(self, node: "Element") -> Optional[bool]: + pass + + @mark_no_op + def visit_Element_value(self, node: "Element") -> None: + pass + + @mark_no_op + def leave_Element_value(self, node: "Element") -> None: + pass + + @mark_no_op + def visit_Element_comma(self, node: "Element") -> None: + pass + + @mark_no_op + def leave_Element_comma(self, node: "Element") -> None: + pass + + @mark_no_op + def visit_Ellipsis(self, node: "Ellipsis") -> Optional[bool]: + pass + + @mark_no_op + def visit_Ellipsis_lpar(self, node: "Ellipsis") -> None: + pass + + @mark_no_op + def leave_Ellipsis_lpar(self, node: "Ellipsis") -> None: + pass + + @mark_no_op + def visit_Ellipsis_rpar(self, node: "Ellipsis") -> None: + pass + + @mark_no_op + def leave_Ellipsis_rpar(self, node: "Ellipsis") -> None: + pass + + @mark_no_op + def visit_Else(self, node: "Else") -> Optional[bool]: + pass + + @mark_no_op + def visit_Else_body(self, node: "Else") -> None: + pass + + @mark_no_op + def leave_Else_body(self, node: "Else") -> None: + pass + + @mark_no_op + def visit_Else_leading_lines(self, node: "Else") -> None: + pass + + @mark_no_op + def leave_Else_leading_lines(self, node: "Else") -> None: + pass + + @mark_no_op + def visit_Else_whitespace_before_colon(self, node: "Else") -> None: + pass + + @mark_no_op + def leave_Else_whitespace_before_colon(self, node: "Else") -> None: + pass + + @mark_no_op + def visit_EmptyLine(self, node: "EmptyLine") -> Optional[bool]: + pass + + @mark_no_op + def visit_EmptyLine_indent(self, node: "EmptyLine") -> None: + pass + + @mark_no_op + def leave_EmptyLine_indent(self, node: "EmptyLine") -> None: + pass + + @mark_no_op + def visit_EmptyLine_whitespace(self, node: "EmptyLine") -> None: + pass + + @mark_no_op + def leave_EmptyLine_whitespace(self, node: "EmptyLine") -> None: + pass + + @mark_no_op + def visit_EmptyLine_comment(self, node: "EmptyLine") -> None: + pass + + @mark_no_op + def leave_EmptyLine_comment(self, node: "EmptyLine") -> None: + pass + + @mark_no_op + def visit_EmptyLine_newline(self, node: "EmptyLine") -> None: + pass + + @mark_no_op + def leave_EmptyLine_newline(self, node: "EmptyLine") -> None: + pass + + @mark_no_op + def visit_Equal(self, node: "Equal") -> Optional[bool]: + pass + + @mark_no_op + def visit_Equal_whitespace_before(self, node: "Equal") -> None: + pass + + @mark_no_op + def leave_Equal_whitespace_before(self, node: "Equal") -> None: + pass + + @mark_no_op + def visit_Equal_whitespace_after(self, node: "Equal") -> None: + pass + + @mark_no_op + def leave_Equal_whitespace_after(self, node: "Equal") -> None: + pass + + @mark_no_op + def visit_ExceptHandler(self, node: "ExceptHandler") -> Optional[bool]: + pass + + @mark_no_op + def visit_ExceptHandler_body(self, node: "ExceptHandler") -> None: + pass + + @mark_no_op + def leave_ExceptHandler_body(self, node: "ExceptHandler") -> None: + pass + + @mark_no_op + def visit_ExceptHandler_type(self, node: "ExceptHandler") -> None: + pass + + @mark_no_op + def leave_ExceptHandler_type(self, node: "ExceptHandler") -> None: + pass + + @mark_no_op + def visit_ExceptHandler_name(self, node: "ExceptHandler") -> None: + pass + + @mark_no_op + def leave_ExceptHandler_name(self, node: "ExceptHandler") -> None: + pass + + @mark_no_op + def visit_ExceptHandler_leading_lines(self, node: "ExceptHandler") -> None: + pass + + @mark_no_op + def leave_ExceptHandler_leading_lines(self, node: "ExceptHandler") -> None: + pass + + @mark_no_op + def visit_ExceptHandler_whitespace_after_except( + self, node: "ExceptHandler" + ) -> None: + pass + + @mark_no_op + def leave_ExceptHandler_whitespace_after_except( + self, node: "ExceptHandler" + ) -> None: + pass + + @mark_no_op + def visit_ExceptHandler_whitespace_before_colon( + self, node: "ExceptHandler" + ) -> None: + pass + + @mark_no_op + def leave_ExceptHandler_whitespace_before_colon( + self, node: "ExceptHandler" + ) -> None: + pass + + @mark_no_op + def visit_ExceptStarHandler(self, node: "ExceptStarHandler") -> Optional[bool]: + pass + + @mark_no_op + def visit_ExceptStarHandler_body(self, node: "ExceptStarHandler") -> None: + pass + + @mark_no_op + def leave_ExceptStarHandler_body(self, node: "ExceptStarHandler") -> None: + pass + + @mark_no_op + def visit_ExceptStarHandler_type(self, node: "ExceptStarHandler") -> None: + pass + + @mark_no_op + def leave_ExceptStarHandler_type(self, node: "ExceptStarHandler") -> None: + pass + + @mark_no_op + def visit_ExceptStarHandler_name(self, node: "ExceptStarHandler") -> None: + pass + + @mark_no_op + def leave_ExceptStarHandler_name(self, node: "ExceptStarHandler") -> None: + pass + + @mark_no_op + def visit_ExceptStarHandler_leading_lines(self, node: "ExceptStarHandler") -> None: + pass + + @mark_no_op + def leave_ExceptStarHandler_leading_lines(self, node: "ExceptStarHandler") -> None: + pass + + @mark_no_op + def visit_ExceptStarHandler_whitespace_after_except( + self, node: "ExceptStarHandler" + ) -> None: + pass + + @mark_no_op + def leave_ExceptStarHandler_whitespace_after_except( + self, node: "ExceptStarHandler" + ) -> None: + pass + + @mark_no_op + def visit_ExceptStarHandler_whitespace_after_star( + self, node: "ExceptStarHandler" + ) -> None: + pass + + @mark_no_op + def leave_ExceptStarHandler_whitespace_after_star( + self, node: "ExceptStarHandler" + ) -> None: + pass + + @mark_no_op + def visit_ExceptStarHandler_whitespace_before_colon( + self, node: "ExceptStarHandler" + ) -> None: + pass + + @mark_no_op + def leave_ExceptStarHandler_whitespace_before_colon( + self, node: "ExceptStarHandler" + ) -> None: + pass + + @mark_no_op + def visit_Expr(self, node: "Expr") -> Optional[bool]: + pass + + @mark_no_op + def visit_Expr_value(self, node: "Expr") -> None: + pass + + @mark_no_op + def leave_Expr_value(self, node: "Expr") -> None: + pass + + @mark_no_op + def visit_Expr_semicolon(self, node: "Expr") -> None: + pass + + @mark_no_op + def leave_Expr_semicolon(self, node: "Expr") -> None: + pass + + @mark_no_op + def visit_Finally(self, node: "Finally") -> Optional[bool]: + pass + + @mark_no_op + def visit_Finally_body(self, node: "Finally") -> None: + pass + + @mark_no_op + def leave_Finally_body(self, node: "Finally") -> None: + pass + + @mark_no_op + def visit_Finally_leading_lines(self, node: "Finally") -> None: + pass + + @mark_no_op + def leave_Finally_leading_lines(self, node: "Finally") -> None: + pass + + @mark_no_op + def visit_Finally_whitespace_before_colon(self, node: "Finally") -> None: + pass + + @mark_no_op + def leave_Finally_whitespace_before_colon(self, node: "Finally") -> None: + pass + + @mark_no_op + def visit_Float(self, node: "Float") -> Optional[bool]: + pass + + @mark_no_op + def visit_Float_value(self, node: "Float") -> None: + pass + + @mark_no_op + def leave_Float_value(self, node: "Float") -> None: + pass + + @mark_no_op + def visit_Float_lpar(self, node: "Float") -> None: + pass + + @mark_no_op + def leave_Float_lpar(self, node: "Float") -> None: + pass + + @mark_no_op + def visit_Float_rpar(self, node: "Float") -> None: + pass + + @mark_no_op + def leave_Float_rpar(self, node: "Float") -> None: + pass + + @mark_no_op + def visit_FloorDivide(self, node: "FloorDivide") -> Optional[bool]: + pass + + @mark_no_op + def visit_FloorDivide_whitespace_before(self, node: "FloorDivide") -> None: + pass + + @mark_no_op + def leave_FloorDivide_whitespace_before(self, node: "FloorDivide") -> None: + pass + + @mark_no_op + def visit_FloorDivide_whitespace_after(self, node: "FloorDivide") -> None: + pass + + @mark_no_op + def leave_FloorDivide_whitespace_after(self, node: "FloorDivide") -> None: + pass + + @mark_no_op + def visit_FloorDivideAssign(self, node: "FloorDivideAssign") -> Optional[bool]: + pass + + @mark_no_op + def visit_FloorDivideAssign_whitespace_before( + self, node: "FloorDivideAssign" + ) -> None: + pass + + @mark_no_op + def leave_FloorDivideAssign_whitespace_before( + self, node: "FloorDivideAssign" + ) -> None: + pass + + @mark_no_op + def visit_FloorDivideAssign_whitespace_after( + self, node: "FloorDivideAssign" + ) -> None: + pass + + @mark_no_op + def leave_FloorDivideAssign_whitespace_after( + self, node: "FloorDivideAssign" + ) -> None: + pass + + @mark_no_op + def visit_For(self, node: "For") -> Optional[bool]: + pass + + @mark_no_op + def visit_For_target(self, node: "For") -> None: + pass + + @mark_no_op + def leave_For_target(self, node: "For") -> None: + pass + + @mark_no_op + def visit_For_iter(self, node: "For") -> None: + pass + + @mark_no_op + def leave_For_iter(self, node: "For") -> None: + pass + + @mark_no_op + def visit_For_body(self, node: "For") -> None: + pass + + @mark_no_op + def leave_For_body(self, node: "For") -> None: + pass + + @mark_no_op + def visit_For_orelse(self, node: "For") -> None: + pass + + @mark_no_op + def leave_For_orelse(self, node: "For") -> None: + pass + + @mark_no_op + def visit_For_asynchronous(self, node: "For") -> None: + pass + + @mark_no_op + def leave_For_asynchronous(self, node: "For") -> None: + pass + + @mark_no_op + def visit_For_leading_lines(self, node: "For") -> None: + pass + + @mark_no_op + def leave_For_leading_lines(self, node: "For") -> None: + pass + + @mark_no_op + def visit_For_whitespace_after_for(self, node: "For") -> None: + pass + + @mark_no_op + def leave_For_whitespace_after_for(self, node: "For") -> None: + pass + + @mark_no_op + def visit_For_whitespace_before_in(self, node: "For") -> None: + pass + + @mark_no_op + def leave_For_whitespace_before_in(self, node: "For") -> None: + pass + + @mark_no_op + def visit_For_whitespace_after_in(self, node: "For") -> None: + pass + + @mark_no_op + def leave_For_whitespace_after_in(self, node: "For") -> None: + pass + + @mark_no_op + def visit_For_whitespace_before_colon(self, node: "For") -> None: + pass + + @mark_no_op + def leave_For_whitespace_before_colon(self, node: "For") -> None: + pass + + @mark_no_op + def visit_FormattedString(self, node: "FormattedString") -> Optional[bool]: + pass + + @mark_no_op + def visit_FormattedString_parts(self, node: "FormattedString") -> None: + pass + + @mark_no_op + def leave_FormattedString_parts(self, node: "FormattedString") -> None: + pass + + @mark_no_op + def visit_FormattedString_start(self, node: "FormattedString") -> None: + pass + + @mark_no_op + def leave_FormattedString_start(self, node: "FormattedString") -> None: + pass + + @mark_no_op + def visit_FormattedString_end(self, node: "FormattedString") -> None: + pass + + @mark_no_op + def leave_FormattedString_end(self, node: "FormattedString") -> None: + pass + + @mark_no_op + def visit_FormattedString_lpar(self, node: "FormattedString") -> None: + pass + + @mark_no_op + def leave_FormattedString_lpar(self, node: "FormattedString") -> None: + pass + + @mark_no_op + def visit_FormattedString_rpar(self, node: "FormattedString") -> None: + pass + + @mark_no_op + def leave_FormattedString_rpar(self, node: "FormattedString") -> None: + pass + + @mark_no_op + def visit_FormattedStringExpression( + self, node: "FormattedStringExpression" + ) -> Optional[bool]: + pass + + @mark_no_op + def visit_FormattedStringExpression_expression( + self, node: "FormattedStringExpression" + ) -> None: + pass + + @mark_no_op + def leave_FormattedStringExpression_expression( + self, node: "FormattedStringExpression" + ) -> None: + pass + + @mark_no_op + def visit_FormattedStringExpression_conversion( + self, node: "FormattedStringExpression" + ) -> None: + pass + + @mark_no_op + def leave_FormattedStringExpression_conversion( + self, node: "FormattedStringExpression" + ) -> None: + pass + + @mark_no_op + def visit_FormattedStringExpression_format_spec( + self, node: "FormattedStringExpression" + ) -> None: + pass + + @mark_no_op + def leave_FormattedStringExpression_format_spec( + self, node: "FormattedStringExpression" + ) -> None: + pass + + @mark_no_op + def visit_FormattedStringExpression_whitespace_before_expression( + self, node: "FormattedStringExpression" + ) -> None: + pass + + @mark_no_op + def leave_FormattedStringExpression_whitespace_before_expression( + self, node: "FormattedStringExpression" + ) -> None: + pass + + @mark_no_op + def visit_FormattedStringExpression_whitespace_after_expression( + self, node: "FormattedStringExpression" + ) -> None: + pass + + @mark_no_op + def leave_FormattedStringExpression_whitespace_after_expression( + self, node: "FormattedStringExpression" + ) -> None: + pass + + @mark_no_op + def visit_FormattedStringExpression_equal( + self, node: "FormattedStringExpression" + ) -> None: + pass + + @mark_no_op + def leave_FormattedStringExpression_equal( + self, node: "FormattedStringExpression" + ) -> None: + pass + + @mark_no_op + def visit_FormattedStringText(self, node: "FormattedStringText") -> Optional[bool]: + pass + + @mark_no_op + def visit_FormattedStringText_value(self, node: "FormattedStringText") -> None: + pass + + @mark_no_op + def leave_FormattedStringText_value(self, node: "FormattedStringText") -> None: + pass + + @mark_no_op + def visit_From(self, node: "From") -> Optional[bool]: + pass + + @mark_no_op + def visit_From_item(self, node: "From") -> None: + pass + + @mark_no_op + def leave_From_item(self, node: "From") -> None: + pass + + @mark_no_op + def visit_From_whitespace_before_from(self, node: "From") -> None: + pass + + @mark_no_op + def leave_From_whitespace_before_from(self, node: "From") -> None: + pass + + @mark_no_op + def visit_From_whitespace_after_from(self, node: "From") -> None: + pass + + @mark_no_op + def leave_From_whitespace_after_from(self, node: "From") -> None: + pass + + @mark_no_op + def visit_FunctionDef(self, node: "FunctionDef") -> Optional[bool]: + pass + + @mark_no_op + def visit_FunctionDef_name(self, node: "FunctionDef") -> None: + pass + + @mark_no_op + def leave_FunctionDef_name(self, node: "FunctionDef") -> None: + pass + + @mark_no_op + def visit_FunctionDef_params(self, node: "FunctionDef") -> None: + pass + + @mark_no_op + def leave_FunctionDef_params(self, node: "FunctionDef") -> None: + pass + + @mark_no_op + def visit_FunctionDef_body(self, node: "FunctionDef") -> None: + pass + + @mark_no_op + def leave_FunctionDef_body(self, node: "FunctionDef") -> None: + pass + + @mark_no_op + def visit_FunctionDef_decorators(self, node: "FunctionDef") -> None: + pass + + @mark_no_op + def leave_FunctionDef_decorators(self, node: "FunctionDef") -> None: + pass + + @mark_no_op + def visit_FunctionDef_returns(self, node: "FunctionDef") -> None: + pass + + @mark_no_op + def leave_FunctionDef_returns(self, node: "FunctionDef") -> None: + pass + + @mark_no_op + def visit_FunctionDef_asynchronous(self, node: "FunctionDef") -> None: + pass + + @mark_no_op + def leave_FunctionDef_asynchronous(self, node: "FunctionDef") -> None: + pass + + @mark_no_op + def visit_FunctionDef_leading_lines(self, node: "FunctionDef") -> None: + pass + + @mark_no_op + def leave_FunctionDef_leading_lines(self, node: "FunctionDef") -> None: + pass + + @mark_no_op + def visit_FunctionDef_lines_after_decorators(self, node: "FunctionDef") -> None: + pass + + @mark_no_op + def leave_FunctionDef_lines_after_decorators(self, node: "FunctionDef") -> None: + pass + + @mark_no_op + def visit_FunctionDef_whitespace_after_def(self, node: "FunctionDef") -> None: + pass + + @mark_no_op + def leave_FunctionDef_whitespace_after_def(self, node: "FunctionDef") -> None: + pass + + @mark_no_op + def visit_FunctionDef_whitespace_after_name(self, node: "FunctionDef") -> None: + pass + + @mark_no_op + def leave_FunctionDef_whitespace_after_name(self, node: "FunctionDef") -> None: + pass + + @mark_no_op + def visit_FunctionDef_whitespace_before_params(self, node: "FunctionDef") -> None: + pass + + @mark_no_op + def leave_FunctionDef_whitespace_before_params(self, node: "FunctionDef") -> None: + pass + + @mark_no_op + def visit_FunctionDef_whitespace_before_colon(self, node: "FunctionDef") -> None: + pass + + @mark_no_op + def leave_FunctionDef_whitespace_before_colon(self, node: "FunctionDef") -> None: + pass + + @mark_no_op + def visit_FunctionDef_type_parameters(self, node: "FunctionDef") -> None: + pass + + @mark_no_op + def leave_FunctionDef_type_parameters(self, node: "FunctionDef") -> None: + pass + + @mark_no_op + def visit_FunctionDef_whitespace_after_type_parameters( + self, node: "FunctionDef" + ) -> None: + pass + + @mark_no_op + def leave_FunctionDef_whitespace_after_type_parameters( + self, node: "FunctionDef" + ) -> None: + pass + + @mark_no_op + def visit_GeneratorExp(self, node: "GeneratorExp") -> Optional[bool]: + pass + + @mark_no_op + def visit_GeneratorExp_elt(self, node: "GeneratorExp") -> None: + pass + + @mark_no_op + def leave_GeneratorExp_elt(self, node: "GeneratorExp") -> None: + pass + + @mark_no_op + def visit_GeneratorExp_for_in(self, node: "GeneratorExp") -> None: + pass + + @mark_no_op + def leave_GeneratorExp_for_in(self, node: "GeneratorExp") -> None: + pass + + @mark_no_op + def visit_GeneratorExp_lpar(self, node: "GeneratorExp") -> None: + pass + + @mark_no_op + def leave_GeneratorExp_lpar(self, node: "GeneratorExp") -> None: + pass + + @mark_no_op + def visit_GeneratorExp_rpar(self, node: "GeneratorExp") -> None: + pass + + @mark_no_op + def leave_GeneratorExp_rpar(self, node: "GeneratorExp") -> None: + pass + + @mark_no_op + def visit_Global(self, node: "Global") -> Optional[bool]: + pass + + @mark_no_op + def visit_Global_names(self, node: "Global") -> None: + pass + + @mark_no_op + def leave_Global_names(self, node: "Global") -> None: + pass + + @mark_no_op + def visit_Global_whitespace_after_global(self, node: "Global") -> None: + pass + + @mark_no_op + def leave_Global_whitespace_after_global(self, node: "Global") -> None: + pass + + @mark_no_op + def visit_Global_semicolon(self, node: "Global") -> None: + pass + + @mark_no_op + def leave_Global_semicolon(self, node: "Global") -> None: + pass + + @mark_no_op + def visit_GreaterThan(self, node: "GreaterThan") -> Optional[bool]: + pass + + @mark_no_op + def visit_GreaterThan_whitespace_before(self, node: "GreaterThan") -> None: + pass + + @mark_no_op + def leave_GreaterThan_whitespace_before(self, node: "GreaterThan") -> None: + pass + + @mark_no_op + def visit_GreaterThan_whitespace_after(self, node: "GreaterThan") -> None: + pass + + @mark_no_op + def leave_GreaterThan_whitespace_after(self, node: "GreaterThan") -> None: + pass + + @mark_no_op + def visit_GreaterThanEqual(self, node: "GreaterThanEqual") -> Optional[bool]: + pass + + @mark_no_op + def visit_GreaterThanEqual_whitespace_before( + self, node: "GreaterThanEqual" + ) -> None: + pass + + @mark_no_op + def leave_GreaterThanEqual_whitespace_before( + self, node: "GreaterThanEqual" + ) -> None: + pass + + @mark_no_op + def visit_GreaterThanEqual_whitespace_after(self, node: "GreaterThanEqual") -> None: + pass + + @mark_no_op + def leave_GreaterThanEqual_whitespace_after(self, node: "GreaterThanEqual") -> None: + pass + + @mark_no_op + def visit_If(self, node: "If") -> Optional[bool]: + pass + + @mark_no_op + def visit_If_test(self, node: "If") -> None: + pass + + @mark_no_op + def leave_If_test(self, node: "If") -> None: + pass + + @mark_no_op + def visit_If_body(self, node: "If") -> None: + pass + + @mark_no_op + def leave_If_body(self, node: "If") -> None: + pass + + @mark_no_op + def visit_If_orelse(self, node: "If") -> None: + pass + + @mark_no_op + def leave_If_orelse(self, node: "If") -> None: + pass + + @mark_no_op + def visit_If_leading_lines(self, node: "If") -> None: + pass + + @mark_no_op + def leave_If_leading_lines(self, node: "If") -> None: + pass + + @mark_no_op + def visit_If_whitespace_before_test(self, node: "If") -> None: + pass + + @mark_no_op + def leave_If_whitespace_before_test(self, node: "If") -> None: + pass + + @mark_no_op + def visit_If_whitespace_after_test(self, node: "If") -> None: + pass + + @mark_no_op + def leave_If_whitespace_after_test(self, node: "If") -> None: + pass + + @mark_no_op + def visit_IfExp(self, node: "IfExp") -> Optional[bool]: + pass + + @mark_no_op + def visit_IfExp_test(self, node: "IfExp") -> None: + pass + + @mark_no_op + def leave_IfExp_test(self, node: "IfExp") -> None: + pass + + @mark_no_op + def visit_IfExp_body(self, node: "IfExp") -> None: + pass + + @mark_no_op + def leave_IfExp_body(self, node: "IfExp") -> None: + pass + + @mark_no_op + def visit_IfExp_orelse(self, node: "IfExp") -> None: + pass + + @mark_no_op + def leave_IfExp_orelse(self, node: "IfExp") -> None: + pass + + @mark_no_op + def visit_IfExp_lpar(self, node: "IfExp") -> None: + pass + + @mark_no_op + def leave_IfExp_lpar(self, node: "IfExp") -> None: + pass + + @mark_no_op + def visit_IfExp_rpar(self, node: "IfExp") -> None: + pass + + @mark_no_op + def leave_IfExp_rpar(self, node: "IfExp") -> None: + pass + + @mark_no_op + def visit_IfExp_whitespace_before_if(self, node: "IfExp") -> None: + pass + + @mark_no_op + def leave_IfExp_whitespace_before_if(self, node: "IfExp") -> None: + pass + + @mark_no_op + def visit_IfExp_whitespace_after_if(self, node: "IfExp") -> None: + pass + + @mark_no_op + def leave_IfExp_whitespace_after_if(self, node: "IfExp") -> None: + pass + + @mark_no_op + def visit_IfExp_whitespace_before_else(self, node: "IfExp") -> None: + pass + + @mark_no_op + def leave_IfExp_whitespace_before_else(self, node: "IfExp") -> None: + pass + + @mark_no_op + def visit_IfExp_whitespace_after_else(self, node: "IfExp") -> None: + pass + + @mark_no_op + def leave_IfExp_whitespace_after_else(self, node: "IfExp") -> None: + pass + + @mark_no_op + def visit_Imaginary(self, node: "Imaginary") -> Optional[bool]: + pass + + @mark_no_op + def visit_Imaginary_value(self, node: "Imaginary") -> None: + pass + + @mark_no_op + def leave_Imaginary_value(self, node: "Imaginary") -> None: + pass + + @mark_no_op + def visit_Imaginary_lpar(self, node: "Imaginary") -> None: + pass + + @mark_no_op + def leave_Imaginary_lpar(self, node: "Imaginary") -> None: + pass + + @mark_no_op + def visit_Imaginary_rpar(self, node: "Imaginary") -> None: + pass + + @mark_no_op + def leave_Imaginary_rpar(self, node: "Imaginary") -> None: + pass + + @mark_no_op + def visit_Import(self, node: "Import") -> Optional[bool]: + pass + + @mark_no_op + def visit_Import_names(self, node: "Import") -> None: + pass + + @mark_no_op + def leave_Import_names(self, node: "Import") -> None: + pass + + @mark_no_op + def visit_Import_semicolon(self, node: "Import") -> None: + pass + + @mark_no_op + def leave_Import_semicolon(self, node: "Import") -> None: + pass + + @mark_no_op + def visit_Import_whitespace_after_import(self, node: "Import") -> None: + pass + + @mark_no_op + def leave_Import_whitespace_after_import(self, node: "Import") -> None: + pass + + @mark_no_op + def visit_ImportAlias(self, node: "ImportAlias") -> Optional[bool]: + pass + + @mark_no_op + def visit_ImportAlias_name(self, node: "ImportAlias") -> None: + pass + + @mark_no_op + def leave_ImportAlias_name(self, node: "ImportAlias") -> None: + pass + + @mark_no_op + def visit_ImportAlias_asname(self, node: "ImportAlias") -> None: + pass + + @mark_no_op + def leave_ImportAlias_asname(self, node: "ImportAlias") -> None: + pass + + @mark_no_op + def visit_ImportAlias_comma(self, node: "ImportAlias") -> None: + pass + + @mark_no_op + def leave_ImportAlias_comma(self, node: "ImportAlias") -> None: + pass + + @mark_no_op + def visit_ImportFrom(self, node: "ImportFrom") -> Optional[bool]: + pass + + @mark_no_op + def visit_ImportFrom_module(self, node: "ImportFrom") -> None: + pass + + @mark_no_op + def leave_ImportFrom_module(self, node: "ImportFrom") -> None: + pass + + @mark_no_op + def visit_ImportFrom_names(self, node: "ImportFrom") -> None: + pass + + @mark_no_op + def leave_ImportFrom_names(self, node: "ImportFrom") -> None: + pass + + @mark_no_op + def visit_ImportFrom_relative(self, node: "ImportFrom") -> None: + pass + + @mark_no_op + def leave_ImportFrom_relative(self, node: "ImportFrom") -> None: + pass + + @mark_no_op + def visit_ImportFrom_lpar(self, node: "ImportFrom") -> None: + pass + + @mark_no_op + def leave_ImportFrom_lpar(self, node: "ImportFrom") -> None: + pass + + @mark_no_op + def visit_ImportFrom_rpar(self, node: "ImportFrom") -> None: + pass + + @mark_no_op + def leave_ImportFrom_rpar(self, node: "ImportFrom") -> None: + pass + + @mark_no_op + def visit_ImportFrom_semicolon(self, node: "ImportFrom") -> None: + pass + + @mark_no_op + def leave_ImportFrom_semicolon(self, node: "ImportFrom") -> None: + pass + + @mark_no_op + def visit_ImportFrom_whitespace_after_from(self, node: "ImportFrom") -> None: + pass + + @mark_no_op + def leave_ImportFrom_whitespace_after_from(self, node: "ImportFrom") -> None: + pass + + @mark_no_op + def visit_ImportFrom_whitespace_before_import(self, node: "ImportFrom") -> None: + pass + + @mark_no_op + def leave_ImportFrom_whitespace_before_import(self, node: "ImportFrom") -> None: + pass + + @mark_no_op + def visit_ImportFrom_whitespace_after_import(self, node: "ImportFrom") -> None: + pass + + @mark_no_op + def leave_ImportFrom_whitespace_after_import(self, node: "ImportFrom") -> None: + pass + + @mark_no_op + def visit_ImportStar(self, node: "ImportStar") -> Optional[bool]: + pass + + @mark_no_op + def visit_In(self, node: "In") -> Optional[bool]: + pass + + @mark_no_op + def visit_In_whitespace_before(self, node: "In") -> None: + pass + + @mark_no_op + def leave_In_whitespace_before(self, node: "In") -> None: + pass + + @mark_no_op + def visit_In_whitespace_after(self, node: "In") -> None: + pass + + @mark_no_op + def leave_In_whitespace_after(self, node: "In") -> None: + pass + + @mark_no_op + def visit_IndentedBlock(self, node: "IndentedBlock") -> Optional[bool]: + pass + + @mark_no_op + def visit_IndentedBlock_body(self, node: "IndentedBlock") -> None: + pass + + @mark_no_op + def leave_IndentedBlock_body(self, node: "IndentedBlock") -> None: + pass + + @mark_no_op + def visit_IndentedBlock_header(self, node: "IndentedBlock") -> None: + pass + + @mark_no_op + def leave_IndentedBlock_header(self, node: "IndentedBlock") -> None: + pass + + @mark_no_op + def visit_IndentedBlock_indent(self, node: "IndentedBlock") -> None: + pass + + @mark_no_op + def leave_IndentedBlock_indent(self, node: "IndentedBlock") -> None: + pass + + @mark_no_op + def visit_IndentedBlock_footer(self, node: "IndentedBlock") -> None: + pass + + @mark_no_op + def leave_IndentedBlock_footer(self, node: "IndentedBlock") -> None: + pass + + @mark_no_op + def visit_Index(self, node: "Index") -> Optional[bool]: + pass + + @mark_no_op + def visit_Index_value(self, node: "Index") -> None: + pass + + @mark_no_op + def leave_Index_value(self, node: "Index") -> None: + pass + + @mark_no_op + def visit_Index_star(self, node: "Index") -> None: + pass + + @mark_no_op + def leave_Index_star(self, node: "Index") -> None: + pass + + @mark_no_op + def visit_Index_whitespace_after_star(self, node: "Index") -> None: + pass + + @mark_no_op + def leave_Index_whitespace_after_star(self, node: "Index") -> None: + pass + + @mark_no_op + def visit_Integer(self, node: "Integer") -> Optional[bool]: + pass + + @mark_no_op + def visit_Integer_value(self, node: "Integer") -> None: + pass + + @mark_no_op + def leave_Integer_value(self, node: "Integer") -> None: + pass + + @mark_no_op + def visit_Integer_lpar(self, node: "Integer") -> None: + pass + + @mark_no_op + def leave_Integer_lpar(self, node: "Integer") -> None: + pass + + @mark_no_op + def visit_Integer_rpar(self, node: "Integer") -> None: + pass + + @mark_no_op + def leave_Integer_rpar(self, node: "Integer") -> None: + pass + + @mark_no_op + def visit_Is(self, node: "Is") -> Optional[bool]: + pass + + @mark_no_op + def visit_Is_whitespace_before(self, node: "Is") -> None: + pass + + @mark_no_op + def leave_Is_whitespace_before(self, node: "Is") -> None: + pass + + @mark_no_op + def visit_Is_whitespace_after(self, node: "Is") -> None: + pass + + @mark_no_op + def leave_Is_whitespace_after(self, node: "Is") -> None: + pass + + @mark_no_op + def visit_IsNot(self, node: "IsNot") -> Optional[bool]: + pass + + @mark_no_op + def visit_IsNot_whitespace_before(self, node: "IsNot") -> None: + pass + + @mark_no_op + def leave_IsNot_whitespace_before(self, node: "IsNot") -> None: + pass + + @mark_no_op + def visit_IsNot_whitespace_between(self, node: "IsNot") -> None: + pass + + @mark_no_op + def leave_IsNot_whitespace_between(self, node: "IsNot") -> None: + pass + + @mark_no_op + def visit_IsNot_whitespace_after(self, node: "IsNot") -> None: + pass + + @mark_no_op + def leave_IsNot_whitespace_after(self, node: "IsNot") -> None: + pass + + @mark_no_op + def visit_Lambda(self, node: "Lambda") -> Optional[bool]: + pass + + @mark_no_op + def visit_Lambda_params(self, node: "Lambda") -> None: + pass + + @mark_no_op + def leave_Lambda_params(self, node: "Lambda") -> None: + pass + + @mark_no_op + def visit_Lambda_body(self, node: "Lambda") -> None: + pass + + @mark_no_op + def leave_Lambda_body(self, node: "Lambda") -> None: + pass + + @mark_no_op + def visit_Lambda_colon(self, node: "Lambda") -> None: + pass + + @mark_no_op + def leave_Lambda_colon(self, node: "Lambda") -> None: + pass + + @mark_no_op + def visit_Lambda_lpar(self, node: "Lambda") -> None: + pass + + @mark_no_op + def leave_Lambda_lpar(self, node: "Lambda") -> None: + pass + + @mark_no_op + def visit_Lambda_rpar(self, node: "Lambda") -> None: + pass + + @mark_no_op + def leave_Lambda_rpar(self, node: "Lambda") -> None: + pass + + @mark_no_op + def visit_Lambda_whitespace_after_lambda(self, node: "Lambda") -> None: + pass + + @mark_no_op + def leave_Lambda_whitespace_after_lambda(self, node: "Lambda") -> None: + pass + + @mark_no_op + def visit_LeftCurlyBrace(self, node: "LeftCurlyBrace") -> Optional[bool]: + pass + + @mark_no_op + def visit_LeftCurlyBrace_whitespace_after(self, node: "LeftCurlyBrace") -> None: + pass + + @mark_no_op + def leave_LeftCurlyBrace_whitespace_after(self, node: "LeftCurlyBrace") -> None: + pass + + @mark_no_op + def visit_LeftParen(self, node: "LeftParen") -> Optional[bool]: + pass + + @mark_no_op + def visit_LeftParen_whitespace_after(self, node: "LeftParen") -> None: + pass + + @mark_no_op + def leave_LeftParen_whitespace_after(self, node: "LeftParen") -> None: + pass + + @mark_no_op + def visit_LeftShift(self, node: "LeftShift") -> Optional[bool]: + pass + + @mark_no_op + def visit_LeftShift_whitespace_before(self, node: "LeftShift") -> None: + pass + + @mark_no_op + def leave_LeftShift_whitespace_before(self, node: "LeftShift") -> None: + pass + + @mark_no_op + def visit_LeftShift_whitespace_after(self, node: "LeftShift") -> None: + pass + + @mark_no_op + def leave_LeftShift_whitespace_after(self, node: "LeftShift") -> None: + pass + + @mark_no_op + def visit_LeftShiftAssign(self, node: "LeftShiftAssign") -> Optional[bool]: + pass + + @mark_no_op + def visit_LeftShiftAssign_whitespace_before(self, node: "LeftShiftAssign") -> None: + pass + + @mark_no_op + def leave_LeftShiftAssign_whitespace_before(self, node: "LeftShiftAssign") -> None: + pass + + @mark_no_op + def visit_LeftShiftAssign_whitespace_after(self, node: "LeftShiftAssign") -> None: + pass + + @mark_no_op + def leave_LeftShiftAssign_whitespace_after(self, node: "LeftShiftAssign") -> None: + pass + + @mark_no_op + def visit_LeftSquareBracket(self, node: "LeftSquareBracket") -> Optional[bool]: + pass + + @mark_no_op + def visit_LeftSquareBracket_whitespace_after( + self, node: "LeftSquareBracket" + ) -> None: + pass + + @mark_no_op + def leave_LeftSquareBracket_whitespace_after( + self, node: "LeftSquareBracket" + ) -> None: + pass + + @mark_no_op + def visit_LessThan(self, node: "LessThan") -> Optional[bool]: + pass + + @mark_no_op + def visit_LessThan_whitespace_before(self, node: "LessThan") -> None: + pass + + @mark_no_op + def leave_LessThan_whitespace_before(self, node: "LessThan") -> None: + pass + + @mark_no_op + def visit_LessThan_whitespace_after(self, node: "LessThan") -> None: + pass + + @mark_no_op + def leave_LessThan_whitespace_after(self, node: "LessThan") -> None: + pass + + @mark_no_op + def visit_LessThanEqual(self, node: "LessThanEqual") -> Optional[bool]: + pass + + @mark_no_op + def visit_LessThanEqual_whitespace_before(self, node: "LessThanEqual") -> None: + pass + + @mark_no_op + def leave_LessThanEqual_whitespace_before(self, node: "LessThanEqual") -> None: + pass + + @mark_no_op + def visit_LessThanEqual_whitespace_after(self, node: "LessThanEqual") -> None: + pass + + @mark_no_op + def leave_LessThanEqual_whitespace_after(self, node: "LessThanEqual") -> None: + pass + + @mark_no_op + def visit_List(self, node: "List") -> Optional[bool]: + pass + + @mark_no_op + def visit_List_elements(self, node: "List") -> None: + pass + + @mark_no_op + def leave_List_elements(self, node: "List") -> None: + pass + + @mark_no_op + def visit_List_lbracket(self, node: "List") -> None: + pass + + @mark_no_op + def leave_List_lbracket(self, node: "List") -> None: + pass + + @mark_no_op + def visit_List_rbracket(self, node: "List") -> None: + pass + + @mark_no_op + def leave_List_rbracket(self, node: "List") -> None: + pass + + @mark_no_op + def visit_List_lpar(self, node: "List") -> None: + pass + + @mark_no_op + def leave_List_lpar(self, node: "List") -> None: + pass + + @mark_no_op + def visit_List_rpar(self, node: "List") -> None: + pass + + @mark_no_op + def leave_List_rpar(self, node: "List") -> None: + pass + + @mark_no_op + def visit_ListComp(self, node: "ListComp") -> Optional[bool]: + pass + + @mark_no_op + def visit_ListComp_elt(self, node: "ListComp") -> None: + pass + + @mark_no_op + def leave_ListComp_elt(self, node: "ListComp") -> None: + pass + + @mark_no_op + def visit_ListComp_for_in(self, node: "ListComp") -> None: + pass + + @mark_no_op + def leave_ListComp_for_in(self, node: "ListComp") -> None: + pass + + @mark_no_op + def visit_ListComp_lbracket(self, node: "ListComp") -> None: + pass + + @mark_no_op + def leave_ListComp_lbracket(self, node: "ListComp") -> None: + pass + + @mark_no_op + def visit_ListComp_rbracket(self, node: "ListComp") -> None: + pass + + @mark_no_op + def leave_ListComp_rbracket(self, node: "ListComp") -> None: + pass + + @mark_no_op + def visit_ListComp_lpar(self, node: "ListComp") -> None: + pass + + @mark_no_op + def leave_ListComp_lpar(self, node: "ListComp") -> None: + pass + + @mark_no_op + def visit_ListComp_rpar(self, node: "ListComp") -> None: + pass + + @mark_no_op + def leave_ListComp_rpar(self, node: "ListComp") -> None: + pass + + @mark_no_op + def visit_Match(self, node: "Match") -> Optional[bool]: + pass + + @mark_no_op + def visit_Match_subject(self, node: "Match") -> None: + pass + + @mark_no_op + def leave_Match_subject(self, node: "Match") -> None: + pass + + @mark_no_op + def visit_Match_cases(self, node: "Match") -> None: + pass + + @mark_no_op + def leave_Match_cases(self, node: "Match") -> None: + pass + + @mark_no_op + def visit_Match_leading_lines(self, node: "Match") -> None: + pass + + @mark_no_op + def leave_Match_leading_lines(self, node: "Match") -> None: + pass + + @mark_no_op + def visit_Match_whitespace_after_match(self, node: "Match") -> None: + pass + + @mark_no_op + def leave_Match_whitespace_after_match(self, node: "Match") -> None: + pass + + @mark_no_op + def visit_Match_whitespace_before_colon(self, node: "Match") -> None: + pass + + @mark_no_op + def leave_Match_whitespace_before_colon(self, node: "Match") -> None: + pass + + @mark_no_op + def visit_Match_whitespace_after_colon(self, node: "Match") -> None: + pass + + @mark_no_op + def leave_Match_whitespace_after_colon(self, node: "Match") -> None: + pass + + @mark_no_op + def visit_Match_indent(self, node: "Match") -> None: + pass + + @mark_no_op + def leave_Match_indent(self, node: "Match") -> None: + pass + + @mark_no_op + def visit_Match_footer(self, node: "Match") -> None: + pass + + @mark_no_op + def leave_Match_footer(self, node: "Match") -> None: + pass + + @mark_no_op + def visit_MatchAs(self, node: "MatchAs") -> Optional[bool]: + pass + + @mark_no_op + def visit_MatchAs_pattern(self, node: "MatchAs") -> None: + pass + + @mark_no_op + def leave_MatchAs_pattern(self, node: "MatchAs") -> None: + pass + + @mark_no_op + def visit_MatchAs_name(self, node: "MatchAs") -> None: + pass + + @mark_no_op + def leave_MatchAs_name(self, node: "MatchAs") -> None: + pass + + @mark_no_op + def visit_MatchAs_whitespace_before_as(self, node: "MatchAs") -> None: + pass + + @mark_no_op + def leave_MatchAs_whitespace_before_as(self, node: "MatchAs") -> None: + pass + + @mark_no_op + def visit_MatchAs_whitespace_after_as(self, node: "MatchAs") -> None: + pass + + @mark_no_op + def leave_MatchAs_whitespace_after_as(self, node: "MatchAs") -> None: + pass + + @mark_no_op + def visit_MatchAs_lpar(self, node: "MatchAs") -> None: + pass + + @mark_no_op + def leave_MatchAs_lpar(self, node: "MatchAs") -> None: + pass + + @mark_no_op + def visit_MatchAs_rpar(self, node: "MatchAs") -> None: + pass + + @mark_no_op + def leave_MatchAs_rpar(self, node: "MatchAs") -> None: + pass + + @mark_no_op + def visit_MatchCase(self, node: "MatchCase") -> Optional[bool]: + pass + + @mark_no_op + def visit_MatchCase_pattern(self, node: "MatchCase") -> None: + pass + + @mark_no_op + def leave_MatchCase_pattern(self, node: "MatchCase") -> None: + pass + + @mark_no_op + def visit_MatchCase_body(self, node: "MatchCase") -> None: + pass + + @mark_no_op + def leave_MatchCase_body(self, node: "MatchCase") -> None: + pass + + @mark_no_op + def visit_MatchCase_guard(self, node: "MatchCase") -> None: + pass + + @mark_no_op + def leave_MatchCase_guard(self, node: "MatchCase") -> None: + pass + + @mark_no_op + def visit_MatchCase_leading_lines(self, node: "MatchCase") -> None: + pass + + @mark_no_op + def leave_MatchCase_leading_lines(self, node: "MatchCase") -> None: + pass + + @mark_no_op + def visit_MatchCase_whitespace_after_case(self, node: "MatchCase") -> None: + pass + + @mark_no_op + def leave_MatchCase_whitespace_after_case(self, node: "MatchCase") -> None: + pass + + @mark_no_op + def visit_MatchCase_whitespace_before_if(self, node: "MatchCase") -> None: + pass + + @mark_no_op + def leave_MatchCase_whitespace_before_if(self, node: "MatchCase") -> None: + pass + + @mark_no_op + def visit_MatchCase_whitespace_after_if(self, node: "MatchCase") -> None: + pass + + @mark_no_op + def leave_MatchCase_whitespace_after_if(self, node: "MatchCase") -> None: + pass + + @mark_no_op + def visit_MatchCase_whitespace_before_colon(self, node: "MatchCase") -> None: + pass + + @mark_no_op + def leave_MatchCase_whitespace_before_colon(self, node: "MatchCase") -> None: + pass + + @mark_no_op + def visit_MatchClass(self, node: "MatchClass") -> Optional[bool]: + pass + + @mark_no_op + def visit_MatchClass_cls(self, node: "MatchClass") -> None: + pass + + @mark_no_op + def leave_MatchClass_cls(self, node: "MatchClass") -> None: + pass + + @mark_no_op + def visit_MatchClass_patterns(self, node: "MatchClass") -> None: + pass + + @mark_no_op + def leave_MatchClass_patterns(self, node: "MatchClass") -> None: + pass + + @mark_no_op + def visit_MatchClass_kwds(self, node: "MatchClass") -> None: + pass + + @mark_no_op + def leave_MatchClass_kwds(self, node: "MatchClass") -> None: + pass + + @mark_no_op + def visit_MatchClass_whitespace_after_cls(self, node: "MatchClass") -> None: + pass + + @mark_no_op + def leave_MatchClass_whitespace_after_cls(self, node: "MatchClass") -> None: + pass + + @mark_no_op + def visit_MatchClass_whitespace_before_patterns(self, node: "MatchClass") -> None: + pass + + @mark_no_op + def leave_MatchClass_whitespace_before_patterns(self, node: "MatchClass") -> None: + pass + + @mark_no_op + def visit_MatchClass_whitespace_after_kwds(self, node: "MatchClass") -> None: + pass + + @mark_no_op + def leave_MatchClass_whitespace_after_kwds(self, node: "MatchClass") -> None: + pass + + @mark_no_op + def visit_MatchClass_lpar(self, node: "MatchClass") -> None: + pass + + @mark_no_op + def leave_MatchClass_lpar(self, node: "MatchClass") -> None: + pass + + @mark_no_op + def visit_MatchClass_rpar(self, node: "MatchClass") -> None: + pass + + @mark_no_op + def leave_MatchClass_rpar(self, node: "MatchClass") -> None: + pass + + @mark_no_op + def visit_MatchKeywordElement(self, node: "MatchKeywordElement") -> Optional[bool]: + pass + + @mark_no_op + def visit_MatchKeywordElement_key(self, node: "MatchKeywordElement") -> None: + pass + + @mark_no_op + def leave_MatchKeywordElement_key(self, node: "MatchKeywordElement") -> None: + pass + + @mark_no_op + def visit_MatchKeywordElement_pattern(self, node: "MatchKeywordElement") -> None: + pass + + @mark_no_op + def leave_MatchKeywordElement_pattern(self, node: "MatchKeywordElement") -> None: + pass + + @mark_no_op + def visit_MatchKeywordElement_comma(self, node: "MatchKeywordElement") -> None: + pass + + @mark_no_op + def leave_MatchKeywordElement_comma(self, node: "MatchKeywordElement") -> None: + pass + + @mark_no_op + def visit_MatchKeywordElement_whitespace_before_equal( + self, node: "MatchKeywordElement" + ) -> None: + pass + + @mark_no_op + def leave_MatchKeywordElement_whitespace_before_equal( + self, node: "MatchKeywordElement" + ) -> None: + pass + + @mark_no_op + def visit_MatchKeywordElement_whitespace_after_equal( + self, node: "MatchKeywordElement" + ) -> None: + pass + + @mark_no_op + def leave_MatchKeywordElement_whitespace_after_equal( + self, node: "MatchKeywordElement" + ) -> None: + pass + + @mark_no_op + def visit_MatchList(self, node: "MatchList") -> Optional[bool]: + pass + + @mark_no_op + def visit_MatchList_patterns(self, node: "MatchList") -> None: + pass + + @mark_no_op + def leave_MatchList_patterns(self, node: "MatchList") -> None: + pass + + @mark_no_op + def visit_MatchList_lbracket(self, node: "MatchList") -> None: + pass + + @mark_no_op + def leave_MatchList_lbracket(self, node: "MatchList") -> None: + pass + + @mark_no_op + def visit_MatchList_rbracket(self, node: "MatchList") -> None: + pass + + @mark_no_op + def leave_MatchList_rbracket(self, node: "MatchList") -> None: + pass + + @mark_no_op + def visit_MatchList_lpar(self, node: "MatchList") -> None: + pass + + @mark_no_op + def leave_MatchList_lpar(self, node: "MatchList") -> None: + pass + + @mark_no_op + def visit_MatchList_rpar(self, node: "MatchList") -> None: + pass + + @mark_no_op + def leave_MatchList_rpar(self, node: "MatchList") -> None: + pass + + @mark_no_op + def visit_MatchMapping(self, node: "MatchMapping") -> Optional[bool]: + pass + + @mark_no_op + def visit_MatchMapping_elements(self, node: "MatchMapping") -> None: + pass + + @mark_no_op + def leave_MatchMapping_elements(self, node: "MatchMapping") -> None: + pass + + @mark_no_op + def visit_MatchMapping_lbrace(self, node: "MatchMapping") -> None: + pass + + @mark_no_op + def leave_MatchMapping_lbrace(self, node: "MatchMapping") -> None: + pass + + @mark_no_op + def visit_MatchMapping_rbrace(self, node: "MatchMapping") -> None: + pass + + @mark_no_op + def leave_MatchMapping_rbrace(self, node: "MatchMapping") -> None: + pass + + @mark_no_op + def visit_MatchMapping_rest(self, node: "MatchMapping") -> None: + pass + + @mark_no_op + def leave_MatchMapping_rest(self, node: "MatchMapping") -> None: + pass + + @mark_no_op + def visit_MatchMapping_whitespace_before_rest(self, node: "MatchMapping") -> None: + pass + + @mark_no_op + def leave_MatchMapping_whitespace_before_rest(self, node: "MatchMapping") -> None: + pass + + @mark_no_op + def visit_MatchMapping_trailing_comma(self, node: "MatchMapping") -> None: + pass + + @mark_no_op + def leave_MatchMapping_trailing_comma(self, node: "MatchMapping") -> None: + pass + + @mark_no_op + def visit_MatchMapping_lpar(self, node: "MatchMapping") -> None: + pass + + @mark_no_op + def leave_MatchMapping_lpar(self, node: "MatchMapping") -> None: + pass + + @mark_no_op + def visit_MatchMapping_rpar(self, node: "MatchMapping") -> None: + pass + + @mark_no_op + def leave_MatchMapping_rpar(self, node: "MatchMapping") -> None: + pass + + @mark_no_op + def visit_MatchMappingElement(self, node: "MatchMappingElement") -> Optional[bool]: + pass + + @mark_no_op + def visit_MatchMappingElement_key(self, node: "MatchMappingElement") -> None: + pass + + @mark_no_op + def leave_MatchMappingElement_key(self, node: "MatchMappingElement") -> None: + pass + + @mark_no_op + def visit_MatchMappingElement_pattern(self, node: "MatchMappingElement") -> None: + pass + + @mark_no_op + def leave_MatchMappingElement_pattern(self, node: "MatchMappingElement") -> None: + pass + + @mark_no_op + def visit_MatchMappingElement_comma(self, node: "MatchMappingElement") -> None: + pass + + @mark_no_op + def leave_MatchMappingElement_comma(self, node: "MatchMappingElement") -> None: + pass + + @mark_no_op + def visit_MatchMappingElement_whitespace_before_colon( + self, node: "MatchMappingElement" + ) -> None: + pass + + @mark_no_op + def leave_MatchMappingElement_whitespace_before_colon( + self, node: "MatchMappingElement" + ) -> None: + pass + + @mark_no_op + def visit_MatchMappingElement_whitespace_after_colon( + self, node: "MatchMappingElement" + ) -> None: + pass + + @mark_no_op + def leave_MatchMappingElement_whitespace_after_colon( + self, node: "MatchMappingElement" + ) -> None: + pass + + @mark_no_op + def visit_MatchOr(self, node: "MatchOr") -> Optional[bool]: + pass + + @mark_no_op + def visit_MatchOr_patterns(self, node: "MatchOr") -> None: + pass + + @mark_no_op + def leave_MatchOr_patterns(self, node: "MatchOr") -> None: + pass + + @mark_no_op + def visit_MatchOr_lpar(self, node: "MatchOr") -> None: + pass + + @mark_no_op + def leave_MatchOr_lpar(self, node: "MatchOr") -> None: + pass + + @mark_no_op + def visit_MatchOr_rpar(self, node: "MatchOr") -> None: + pass + + @mark_no_op + def leave_MatchOr_rpar(self, node: "MatchOr") -> None: + pass + + @mark_no_op + def visit_MatchOrElement(self, node: "MatchOrElement") -> Optional[bool]: + pass + + @mark_no_op + def visit_MatchOrElement_pattern(self, node: "MatchOrElement") -> None: + pass + + @mark_no_op + def leave_MatchOrElement_pattern(self, node: "MatchOrElement") -> None: + pass + + @mark_no_op + def visit_MatchOrElement_separator(self, node: "MatchOrElement") -> None: + pass + + @mark_no_op + def leave_MatchOrElement_separator(self, node: "MatchOrElement") -> None: + pass + + @mark_no_op + def visit_MatchPattern(self, node: "MatchPattern") -> Optional[bool]: + pass + + @mark_no_op + def visit_MatchSequence(self, node: "MatchSequence") -> Optional[bool]: + pass + + @mark_no_op + def visit_MatchSequenceElement( + self, node: "MatchSequenceElement" + ) -> Optional[bool]: + pass + + @mark_no_op + def visit_MatchSequenceElement_value(self, node: "MatchSequenceElement") -> None: + pass + + @mark_no_op + def leave_MatchSequenceElement_value(self, node: "MatchSequenceElement") -> None: + pass + + @mark_no_op + def visit_MatchSequenceElement_comma(self, node: "MatchSequenceElement") -> None: + pass + + @mark_no_op + def leave_MatchSequenceElement_comma(self, node: "MatchSequenceElement") -> None: + pass + + @mark_no_op + def visit_MatchSingleton(self, node: "MatchSingleton") -> Optional[bool]: + pass + + @mark_no_op + def visit_MatchSingleton_value(self, node: "MatchSingleton") -> None: + pass + + @mark_no_op + def leave_MatchSingleton_value(self, node: "MatchSingleton") -> None: + pass + + @mark_no_op + def visit_MatchStar(self, node: "MatchStar") -> Optional[bool]: + pass + + @mark_no_op + def visit_MatchStar_name(self, node: "MatchStar") -> None: + pass + + @mark_no_op + def leave_MatchStar_name(self, node: "MatchStar") -> None: + pass + + @mark_no_op + def visit_MatchStar_comma(self, node: "MatchStar") -> None: + pass + + @mark_no_op + def leave_MatchStar_comma(self, node: "MatchStar") -> None: + pass + + @mark_no_op + def visit_MatchStar_whitespace_before_name(self, node: "MatchStar") -> None: + pass + + @mark_no_op + def leave_MatchStar_whitespace_before_name(self, node: "MatchStar") -> None: + pass + + @mark_no_op + def visit_MatchTuple(self, node: "MatchTuple") -> Optional[bool]: + pass + + @mark_no_op + def visit_MatchTuple_patterns(self, node: "MatchTuple") -> None: + pass + + @mark_no_op + def leave_MatchTuple_patterns(self, node: "MatchTuple") -> None: + pass + + @mark_no_op + def visit_MatchTuple_lpar(self, node: "MatchTuple") -> None: + pass + + @mark_no_op + def leave_MatchTuple_lpar(self, node: "MatchTuple") -> None: + pass + + @mark_no_op + def visit_MatchTuple_rpar(self, node: "MatchTuple") -> None: + pass + + @mark_no_op + def leave_MatchTuple_rpar(self, node: "MatchTuple") -> None: + pass + + @mark_no_op + def visit_MatchValue(self, node: "MatchValue") -> Optional[bool]: + pass + + @mark_no_op + def visit_MatchValue_value(self, node: "MatchValue") -> None: + pass + + @mark_no_op + def leave_MatchValue_value(self, node: "MatchValue") -> None: + pass + + @mark_no_op + def visit_MatrixMultiply(self, node: "MatrixMultiply") -> Optional[bool]: + pass + + @mark_no_op + def visit_MatrixMultiply_whitespace_before(self, node: "MatrixMultiply") -> None: + pass + + @mark_no_op + def leave_MatrixMultiply_whitespace_before(self, node: "MatrixMultiply") -> None: + pass + + @mark_no_op + def visit_MatrixMultiply_whitespace_after(self, node: "MatrixMultiply") -> None: + pass + + @mark_no_op + def leave_MatrixMultiply_whitespace_after(self, node: "MatrixMultiply") -> None: + pass + + @mark_no_op + def visit_MatrixMultiplyAssign( + self, node: "MatrixMultiplyAssign" + ) -> Optional[bool]: + pass + + @mark_no_op + def visit_MatrixMultiplyAssign_whitespace_before( + self, node: "MatrixMultiplyAssign" + ) -> None: + pass + + @mark_no_op + def leave_MatrixMultiplyAssign_whitespace_before( + self, node: "MatrixMultiplyAssign" + ) -> None: + pass + + @mark_no_op + def visit_MatrixMultiplyAssign_whitespace_after( + self, node: "MatrixMultiplyAssign" + ) -> None: + pass + + @mark_no_op + def leave_MatrixMultiplyAssign_whitespace_after( + self, node: "MatrixMultiplyAssign" + ) -> None: + pass + + @mark_no_op + def visit_Minus(self, node: "Minus") -> Optional[bool]: + pass + + @mark_no_op + def visit_Minus_whitespace_after(self, node: "Minus") -> None: + pass + + @mark_no_op + def leave_Minus_whitespace_after(self, node: "Minus") -> None: + pass + + @mark_no_op + def visit_Module(self, node: "Module") -> Optional[bool]: + pass + + @mark_no_op + def visit_Module_body(self, node: "Module") -> None: + pass + + @mark_no_op + def leave_Module_body(self, node: "Module") -> None: + pass + + @mark_no_op + def visit_Module_header(self, node: "Module") -> None: + pass + + @mark_no_op + def leave_Module_header(self, node: "Module") -> None: + pass + + @mark_no_op + def visit_Module_footer(self, node: "Module") -> None: + pass + + @mark_no_op + def leave_Module_footer(self, node: "Module") -> None: + pass + + @mark_no_op + def visit_Module_encoding(self, node: "Module") -> None: + pass + + @mark_no_op + def leave_Module_encoding(self, node: "Module") -> None: + pass + + @mark_no_op + def visit_Module_default_indent(self, node: "Module") -> None: + pass + + @mark_no_op + def leave_Module_default_indent(self, node: "Module") -> None: + pass + + @mark_no_op + def visit_Module_default_newline(self, node: "Module") -> None: + pass + + @mark_no_op + def leave_Module_default_newline(self, node: "Module") -> None: + pass + + @mark_no_op + def visit_Module_has_trailing_newline(self, node: "Module") -> None: + pass + + @mark_no_op + def leave_Module_has_trailing_newline(self, node: "Module") -> None: + pass + + @mark_no_op + def visit_Modulo(self, node: "Modulo") -> Optional[bool]: + pass + + @mark_no_op + def visit_Modulo_whitespace_before(self, node: "Modulo") -> None: + pass + + @mark_no_op + def leave_Modulo_whitespace_before(self, node: "Modulo") -> None: + pass + + @mark_no_op + def visit_Modulo_whitespace_after(self, node: "Modulo") -> None: + pass + + @mark_no_op + def leave_Modulo_whitespace_after(self, node: "Modulo") -> None: + pass + + @mark_no_op + def visit_ModuloAssign(self, node: "ModuloAssign") -> Optional[bool]: + pass + + @mark_no_op + def visit_ModuloAssign_whitespace_before(self, node: "ModuloAssign") -> None: + pass + + @mark_no_op + def leave_ModuloAssign_whitespace_before(self, node: "ModuloAssign") -> None: + pass + + @mark_no_op + def visit_ModuloAssign_whitespace_after(self, node: "ModuloAssign") -> None: + pass + + @mark_no_op + def leave_ModuloAssign_whitespace_after(self, node: "ModuloAssign") -> None: + pass + + @mark_no_op + def visit_Multiply(self, node: "Multiply") -> Optional[bool]: + pass + + @mark_no_op + def visit_Multiply_whitespace_before(self, node: "Multiply") -> None: + pass + + @mark_no_op + def leave_Multiply_whitespace_before(self, node: "Multiply") -> None: + pass + + @mark_no_op + def visit_Multiply_whitespace_after(self, node: "Multiply") -> None: + pass + + @mark_no_op + def leave_Multiply_whitespace_after(self, node: "Multiply") -> None: + pass + + @mark_no_op + def visit_MultiplyAssign(self, node: "MultiplyAssign") -> Optional[bool]: + pass + + @mark_no_op + def visit_MultiplyAssign_whitespace_before(self, node: "MultiplyAssign") -> None: + pass + + @mark_no_op + def leave_MultiplyAssign_whitespace_before(self, node: "MultiplyAssign") -> None: + pass + + @mark_no_op + def visit_MultiplyAssign_whitespace_after(self, node: "MultiplyAssign") -> None: + pass + + @mark_no_op + def leave_MultiplyAssign_whitespace_after(self, node: "MultiplyAssign") -> None: + pass + + @mark_no_op + def visit_Name(self, node: "Name") -> Optional[bool]: + pass + + @mark_no_op + def visit_Name_value(self, node: "Name") -> None: + pass + + @mark_no_op + def leave_Name_value(self, node: "Name") -> None: + pass + + @mark_no_op + def visit_Name_lpar(self, node: "Name") -> None: + pass + + @mark_no_op + def leave_Name_lpar(self, node: "Name") -> None: + pass + + @mark_no_op + def visit_Name_rpar(self, node: "Name") -> None: + pass + + @mark_no_op + def leave_Name_rpar(self, node: "Name") -> None: + pass + + @mark_no_op + def visit_NameItem(self, node: "NameItem") -> Optional[bool]: + pass + + @mark_no_op + def visit_NameItem_name(self, node: "NameItem") -> None: + pass + + @mark_no_op + def leave_NameItem_name(self, node: "NameItem") -> None: + pass + + @mark_no_op + def visit_NameItem_comma(self, node: "NameItem") -> None: + pass + + @mark_no_op + def leave_NameItem_comma(self, node: "NameItem") -> None: + pass + + @mark_no_op + def visit_NamedExpr(self, node: "NamedExpr") -> Optional[bool]: + pass + + @mark_no_op + def visit_NamedExpr_target(self, node: "NamedExpr") -> None: + pass + + @mark_no_op + def leave_NamedExpr_target(self, node: "NamedExpr") -> None: + pass + + @mark_no_op + def visit_NamedExpr_value(self, node: "NamedExpr") -> None: + pass + + @mark_no_op + def leave_NamedExpr_value(self, node: "NamedExpr") -> None: + pass + + @mark_no_op + def visit_NamedExpr_lpar(self, node: "NamedExpr") -> None: + pass + + @mark_no_op + def leave_NamedExpr_lpar(self, node: "NamedExpr") -> None: + pass + + @mark_no_op + def visit_NamedExpr_rpar(self, node: "NamedExpr") -> None: + pass + + @mark_no_op + def leave_NamedExpr_rpar(self, node: "NamedExpr") -> None: + pass + + @mark_no_op + def visit_NamedExpr_whitespace_before_walrus(self, node: "NamedExpr") -> None: + pass + + @mark_no_op + def leave_NamedExpr_whitespace_before_walrus(self, node: "NamedExpr") -> None: + pass + + @mark_no_op + def visit_NamedExpr_whitespace_after_walrus(self, node: "NamedExpr") -> None: + pass + + @mark_no_op + def leave_NamedExpr_whitespace_after_walrus(self, node: "NamedExpr") -> None: + pass + + @mark_no_op + def visit_Newline(self, node: "Newline") -> Optional[bool]: + pass + + @mark_no_op + def visit_Newline_value(self, node: "Newline") -> None: + pass + + @mark_no_op + def leave_Newline_value(self, node: "Newline") -> None: + pass + + @mark_no_op + def visit_Nonlocal(self, node: "Nonlocal") -> Optional[bool]: + pass + + @mark_no_op + def visit_Nonlocal_names(self, node: "Nonlocal") -> None: + pass + + @mark_no_op + def leave_Nonlocal_names(self, node: "Nonlocal") -> None: + pass + + @mark_no_op + def visit_Nonlocal_whitespace_after_nonlocal(self, node: "Nonlocal") -> None: + pass + + @mark_no_op + def leave_Nonlocal_whitespace_after_nonlocal(self, node: "Nonlocal") -> None: + pass + + @mark_no_op + def visit_Nonlocal_semicolon(self, node: "Nonlocal") -> None: + pass + + @mark_no_op + def leave_Nonlocal_semicolon(self, node: "Nonlocal") -> None: + pass + + @mark_no_op + def visit_Not(self, node: "Not") -> Optional[bool]: + pass + + @mark_no_op + def visit_Not_whitespace_after(self, node: "Not") -> None: + pass + + @mark_no_op + def leave_Not_whitespace_after(self, node: "Not") -> None: + pass + + @mark_no_op + def visit_NotEqual(self, node: "NotEqual") -> Optional[bool]: + pass + + @mark_no_op + def visit_NotEqual_value(self, node: "NotEqual") -> None: + pass + + @mark_no_op + def leave_NotEqual_value(self, node: "NotEqual") -> None: + pass + + @mark_no_op + def visit_NotEqual_whitespace_before(self, node: "NotEqual") -> None: + pass + + @mark_no_op + def leave_NotEqual_whitespace_before(self, node: "NotEqual") -> None: + pass + + @mark_no_op + def visit_NotEqual_whitespace_after(self, node: "NotEqual") -> None: + pass + + @mark_no_op + def leave_NotEqual_whitespace_after(self, node: "NotEqual") -> None: + pass + + @mark_no_op + def visit_NotIn(self, node: "NotIn") -> Optional[bool]: + pass + + @mark_no_op + def visit_NotIn_whitespace_before(self, node: "NotIn") -> None: + pass + + @mark_no_op + def leave_NotIn_whitespace_before(self, node: "NotIn") -> None: + pass + + @mark_no_op + def visit_NotIn_whitespace_between(self, node: "NotIn") -> None: + pass + + @mark_no_op + def leave_NotIn_whitespace_between(self, node: "NotIn") -> None: + pass + + @mark_no_op + def visit_NotIn_whitespace_after(self, node: "NotIn") -> None: + pass + + @mark_no_op + def leave_NotIn_whitespace_after(self, node: "NotIn") -> None: + pass + + @mark_no_op + def visit_Or(self, node: "Or") -> Optional[bool]: + pass + + @mark_no_op + def visit_Or_whitespace_before(self, node: "Or") -> None: + pass + + @mark_no_op + def leave_Or_whitespace_before(self, node: "Or") -> None: + pass + + @mark_no_op + def visit_Or_whitespace_after(self, node: "Or") -> None: + pass + + @mark_no_op + def leave_Or_whitespace_after(self, node: "Or") -> None: + pass + + @mark_no_op + def visit_Param(self, node: "Param") -> Optional[bool]: + pass + + @mark_no_op + def visit_Param_name(self, node: "Param") -> None: + pass + + @mark_no_op + def leave_Param_name(self, node: "Param") -> None: + pass + + @mark_no_op + def visit_Param_annotation(self, node: "Param") -> None: + pass + + @mark_no_op + def leave_Param_annotation(self, node: "Param") -> None: + pass + + @mark_no_op + def visit_Param_equal(self, node: "Param") -> None: + pass + + @mark_no_op + def leave_Param_equal(self, node: "Param") -> None: + pass + + @mark_no_op + def visit_Param_default(self, node: "Param") -> None: + pass + + @mark_no_op + def leave_Param_default(self, node: "Param") -> None: + pass + + @mark_no_op + def visit_Param_comma(self, node: "Param") -> None: + pass + + @mark_no_op + def leave_Param_comma(self, node: "Param") -> None: + pass + + @mark_no_op + def visit_Param_star(self, node: "Param") -> None: + pass + + @mark_no_op + def leave_Param_star(self, node: "Param") -> None: + pass + + @mark_no_op + def visit_Param_whitespace_after_star(self, node: "Param") -> None: + pass + + @mark_no_op + def leave_Param_whitespace_after_star(self, node: "Param") -> None: + pass + + @mark_no_op + def visit_Param_whitespace_after_param(self, node: "Param") -> None: + pass + + @mark_no_op + def leave_Param_whitespace_after_param(self, node: "Param") -> None: + pass + + @mark_no_op + def visit_ParamSlash(self, node: "ParamSlash") -> Optional[bool]: + pass + + @mark_no_op + def visit_ParamSlash_comma(self, node: "ParamSlash") -> None: + pass + + @mark_no_op + def leave_ParamSlash_comma(self, node: "ParamSlash") -> None: + pass + + @mark_no_op + def visit_ParamSlash_whitespace_after(self, node: "ParamSlash") -> None: + pass + + @mark_no_op + def leave_ParamSlash_whitespace_after(self, node: "ParamSlash") -> None: + pass + + @mark_no_op + def visit_ParamSpec(self, node: "ParamSpec") -> Optional[bool]: + pass + + @mark_no_op + def visit_ParamSpec_name(self, node: "ParamSpec") -> None: + pass + + @mark_no_op + def leave_ParamSpec_name(self, node: "ParamSpec") -> None: + pass + + @mark_no_op + def visit_ParamSpec_whitespace_after_star(self, node: "ParamSpec") -> None: + pass + + @mark_no_op + def leave_ParamSpec_whitespace_after_star(self, node: "ParamSpec") -> None: + pass + + @mark_no_op + def visit_ParamStar(self, node: "ParamStar") -> Optional[bool]: + pass + + @mark_no_op + def visit_ParamStar_comma(self, node: "ParamStar") -> None: + pass + + @mark_no_op + def leave_ParamStar_comma(self, node: "ParamStar") -> None: + pass + + @mark_no_op + def visit_Parameters(self, node: "Parameters") -> Optional[bool]: + pass + + @mark_no_op + def visit_Parameters_params(self, node: "Parameters") -> None: + pass + + @mark_no_op + def leave_Parameters_params(self, node: "Parameters") -> None: + pass + + @mark_no_op + def visit_Parameters_star_arg(self, node: "Parameters") -> None: + pass + + @mark_no_op + def leave_Parameters_star_arg(self, node: "Parameters") -> None: + pass + + @mark_no_op + def visit_Parameters_kwonly_params(self, node: "Parameters") -> None: + pass + + @mark_no_op + def leave_Parameters_kwonly_params(self, node: "Parameters") -> None: + pass + + @mark_no_op + def visit_Parameters_star_kwarg(self, node: "Parameters") -> None: + pass + + @mark_no_op + def leave_Parameters_star_kwarg(self, node: "Parameters") -> None: + pass + + @mark_no_op + def visit_Parameters_posonly_params(self, node: "Parameters") -> None: + pass + + @mark_no_op + def leave_Parameters_posonly_params(self, node: "Parameters") -> None: + pass + + @mark_no_op + def visit_Parameters_posonly_ind(self, node: "Parameters") -> None: + pass + + @mark_no_op + def leave_Parameters_posonly_ind(self, node: "Parameters") -> None: + pass + + @mark_no_op + def visit_ParenthesizedWhitespace( + self, node: "ParenthesizedWhitespace" + ) -> Optional[bool]: + pass + + @mark_no_op + def visit_ParenthesizedWhitespace_first_line( + self, node: "ParenthesizedWhitespace" + ) -> None: + pass + + @mark_no_op + def leave_ParenthesizedWhitespace_first_line( + self, node: "ParenthesizedWhitespace" + ) -> None: + pass + + @mark_no_op + def visit_ParenthesizedWhitespace_empty_lines( + self, node: "ParenthesizedWhitespace" + ) -> None: + pass + + @mark_no_op + def leave_ParenthesizedWhitespace_empty_lines( + self, node: "ParenthesizedWhitespace" + ) -> None: + pass + + @mark_no_op + def visit_ParenthesizedWhitespace_indent( + self, node: "ParenthesizedWhitespace" + ) -> None: + pass + + @mark_no_op + def leave_ParenthesizedWhitespace_indent( + self, node: "ParenthesizedWhitespace" + ) -> None: + pass + + @mark_no_op + def visit_ParenthesizedWhitespace_last_line( + self, node: "ParenthesizedWhitespace" + ) -> None: + pass + + @mark_no_op + def leave_ParenthesizedWhitespace_last_line( + self, node: "ParenthesizedWhitespace" + ) -> None: + pass + + @mark_no_op + def visit_Pass(self, node: "Pass") -> Optional[bool]: + pass + + @mark_no_op + def visit_Pass_semicolon(self, node: "Pass") -> None: + pass + + @mark_no_op + def leave_Pass_semicolon(self, node: "Pass") -> None: + pass + + @mark_no_op + def visit_Plus(self, node: "Plus") -> Optional[bool]: + pass + + @mark_no_op + def visit_Plus_whitespace_after(self, node: "Plus") -> None: + pass + + @mark_no_op + def leave_Plus_whitespace_after(self, node: "Plus") -> None: + pass + + @mark_no_op + def visit_Power(self, node: "Power") -> Optional[bool]: + pass + + @mark_no_op + def visit_Power_whitespace_before(self, node: "Power") -> None: + pass + + @mark_no_op + def leave_Power_whitespace_before(self, node: "Power") -> None: + pass + + @mark_no_op + def visit_Power_whitespace_after(self, node: "Power") -> None: + pass + + @mark_no_op + def leave_Power_whitespace_after(self, node: "Power") -> None: + pass + + @mark_no_op + def visit_PowerAssign(self, node: "PowerAssign") -> Optional[bool]: + pass + + @mark_no_op + def visit_PowerAssign_whitespace_before(self, node: "PowerAssign") -> None: + pass + + @mark_no_op + def leave_PowerAssign_whitespace_before(self, node: "PowerAssign") -> None: + pass + + @mark_no_op + def visit_PowerAssign_whitespace_after(self, node: "PowerAssign") -> None: + pass + + @mark_no_op + def leave_PowerAssign_whitespace_after(self, node: "PowerAssign") -> None: + pass + + @mark_no_op + def visit_Raise(self, node: "Raise") -> Optional[bool]: + pass + + @mark_no_op + def visit_Raise_exc(self, node: "Raise") -> None: + pass + + @mark_no_op + def leave_Raise_exc(self, node: "Raise") -> None: + pass + + @mark_no_op + def visit_Raise_cause(self, node: "Raise") -> None: + pass + + @mark_no_op + def leave_Raise_cause(self, node: "Raise") -> None: + pass + + @mark_no_op + def visit_Raise_whitespace_after_raise(self, node: "Raise") -> None: + pass + + @mark_no_op + def leave_Raise_whitespace_after_raise(self, node: "Raise") -> None: + pass + + @mark_no_op + def visit_Raise_semicolon(self, node: "Raise") -> None: + pass + + @mark_no_op + def leave_Raise_semicolon(self, node: "Raise") -> None: + pass + + @mark_no_op + def visit_Return(self, node: "Return") -> Optional[bool]: + pass + + @mark_no_op + def visit_Return_value(self, node: "Return") -> None: + pass + + @mark_no_op + def leave_Return_value(self, node: "Return") -> None: + pass + + @mark_no_op + def visit_Return_whitespace_after_return(self, node: "Return") -> None: + pass + + @mark_no_op + def leave_Return_whitespace_after_return(self, node: "Return") -> None: + pass + + @mark_no_op + def visit_Return_semicolon(self, node: "Return") -> None: + pass + + @mark_no_op + def leave_Return_semicolon(self, node: "Return") -> None: + pass + + @mark_no_op + def visit_RightCurlyBrace(self, node: "RightCurlyBrace") -> Optional[bool]: + pass + + @mark_no_op + def visit_RightCurlyBrace_whitespace_before(self, node: "RightCurlyBrace") -> None: + pass + + @mark_no_op + def leave_RightCurlyBrace_whitespace_before(self, node: "RightCurlyBrace") -> None: + pass + + @mark_no_op + def visit_RightParen(self, node: "RightParen") -> Optional[bool]: + pass + + @mark_no_op + def visit_RightParen_whitespace_before(self, node: "RightParen") -> None: + pass + + @mark_no_op + def leave_RightParen_whitespace_before(self, node: "RightParen") -> None: + pass + + @mark_no_op + def visit_RightShift(self, node: "RightShift") -> Optional[bool]: + pass + + @mark_no_op + def visit_RightShift_whitespace_before(self, node: "RightShift") -> None: + pass + + @mark_no_op + def leave_RightShift_whitespace_before(self, node: "RightShift") -> None: + pass + + @mark_no_op + def visit_RightShift_whitespace_after(self, node: "RightShift") -> None: + pass + + @mark_no_op + def leave_RightShift_whitespace_after(self, node: "RightShift") -> None: + pass + + @mark_no_op + def visit_RightShiftAssign(self, node: "RightShiftAssign") -> Optional[bool]: + pass + + @mark_no_op + def visit_RightShiftAssign_whitespace_before( + self, node: "RightShiftAssign" + ) -> None: + pass + + @mark_no_op + def leave_RightShiftAssign_whitespace_before( + self, node: "RightShiftAssign" + ) -> None: + pass + + @mark_no_op + def visit_RightShiftAssign_whitespace_after(self, node: "RightShiftAssign") -> None: + pass + + @mark_no_op + def leave_RightShiftAssign_whitespace_after(self, node: "RightShiftAssign") -> None: + pass + + @mark_no_op + def visit_RightSquareBracket(self, node: "RightSquareBracket") -> Optional[bool]: + pass + + @mark_no_op + def visit_RightSquareBracket_whitespace_before( + self, node: "RightSquareBracket" + ) -> None: + pass + + @mark_no_op + def leave_RightSquareBracket_whitespace_before( + self, node: "RightSquareBracket" + ) -> None: + pass + + @mark_no_op + def visit_Semicolon(self, node: "Semicolon") -> Optional[bool]: + pass + + @mark_no_op + def visit_Semicolon_whitespace_before(self, node: "Semicolon") -> None: + pass + + @mark_no_op + def leave_Semicolon_whitespace_before(self, node: "Semicolon") -> None: + pass + + @mark_no_op + def visit_Semicolon_whitespace_after(self, node: "Semicolon") -> None: + pass + + @mark_no_op + def leave_Semicolon_whitespace_after(self, node: "Semicolon") -> None: + pass + + @mark_no_op + def visit_Set(self, node: "Set") -> Optional[bool]: + pass + + @mark_no_op + def visit_Set_elements(self, node: "Set") -> None: + pass + + @mark_no_op + def leave_Set_elements(self, node: "Set") -> None: + pass + + @mark_no_op + def visit_Set_lbrace(self, node: "Set") -> None: + pass + + @mark_no_op + def leave_Set_lbrace(self, node: "Set") -> None: + pass + + @mark_no_op + def visit_Set_rbrace(self, node: "Set") -> None: + pass + + @mark_no_op + def leave_Set_rbrace(self, node: "Set") -> None: + pass + + @mark_no_op + def visit_Set_lpar(self, node: "Set") -> None: + pass + + @mark_no_op + def leave_Set_lpar(self, node: "Set") -> None: + pass + + @mark_no_op + def visit_Set_rpar(self, node: "Set") -> None: + pass + + @mark_no_op + def leave_Set_rpar(self, node: "Set") -> None: + pass + + @mark_no_op + def visit_SetComp(self, node: "SetComp") -> Optional[bool]: + pass + + @mark_no_op + def visit_SetComp_elt(self, node: "SetComp") -> None: + pass + + @mark_no_op + def leave_SetComp_elt(self, node: "SetComp") -> None: + pass + + @mark_no_op + def visit_SetComp_for_in(self, node: "SetComp") -> None: + pass + + @mark_no_op + def leave_SetComp_for_in(self, node: "SetComp") -> None: + pass + + @mark_no_op + def visit_SetComp_lbrace(self, node: "SetComp") -> None: + pass + + @mark_no_op + def leave_SetComp_lbrace(self, node: "SetComp") -> None: + pass + + @mark_no_op + def visit_SetComp_rbrace(self, node: "SetComp") -> None: + pass + + @mark_no_op + def leave_SetComp_rbrace(self, node: "SetComp") -> None: + pass + + @mark_no_op + def visit_SetComp_lpar(self, node: "SetComp") -> None: + pass + + @mark_no_op + def leave_SetComp_lpar(self, node: "SetComp") -> None: + pass + + @mark_no_op + def visit_SetComp_rpar(self, node: "SetComp") -> None: + pass + + @mark_no_op + def leave_SetComp_rpar(self, node: "SetComp") -> None: + pass + + @mark_no_op + def visit_SimpleStatementLine(self, node: "SimpleStatementLine") -> Optional[bool]: + pass + + @mark_no_op + def visit_SimpleStatementLine_body(self, node: "SimpleStatementLine") -> None: + pass + + @mark_no_op + def leave_SimpleStatementLine_body(self, node: "SimpleStatementLine") -> None: + pass + + @mark_no_op + def visit_SimpleStatementLine_leading_lines( + self, node: "SimpleStatementLine" + ) -> None: + pass + + @mark_no_op + def leave_SimpleStatementLine_leading_lines( + self, node: "SimpleStatementLine" + ) -> None: + pass + + @mark_no_op + def visit_SimpleStatementLine_trailing_whitespace( + self, node: "SimpleStatementLine" + ) -> None: + pass + + @mark_no_op + def leave_SimpleStatementLine_trailing_whitespace( + self, node: "SimpleStatementLine" + ) -> None: + pass + + @mark_no_op + def visit_SimpleStatementSuite( + self, node: "SimpleStatementSuite" + ) -> Optional[bool]: + pass + + @mark_no_op + def visit_SimpleStatementSuite_body(self, node: "SimpleStatementSuite") -> None: + pass + + @mark_no_op + def leave_SimpleStatementSuite_body(self, node: "SimpleStatementSuite") -> None: + pass + + @mark_no_op + def visit_SimpleStatementSuite_leading_whitespace( + self, node: "SimpleStatementSuite" + ) -> None: + pass + + @mark_no_op + def leave_SimpleStatementSuite_leading_whitespace( + self, node: "SimpleStatementSuite" + ) -> None: + pass + + @mark_no_op + def visit_SimpleStatementSuite_trailing_whitespace( + self, node: "SimpleStatementSuite" + ) -> None: + pass + + @mark_no_op + def leave_SimpleStatementSuite_trailing_whitespace( + self, node: "SimpleStatementSuite" + ) -> None: + pass + + @mark_no_op + def visit_SimpleString(self, node: "SimpleString") -> Optional[bool]: + pass + + @mark_no_op + def visit_SimpleString_value(self, node: "SimpleString") -> None: + pass + + @mark_no_op + def leave_SimpleString_value(self, node: "SimpleString") -> None: + pass + + @mark_no_op + def visit_SimpleString_lpar(self, node: "SimpleString") -> None: + pass + + @mark_no_op + def leave_SimpleString_lpar(self, node: "SimpleString") -> None: + pass + + @mark_no_op + def visit_SimpleString_rpar(self, node: "SimpleString") -> None: + pass + + @mark_no_op + def leave_SimpleString_rpar(self, node: "SimpleString") -> None: + pass + + @mark_no_op + def visit_SimpleWhitespace(self, node: "SimpleWhitespace") -> Optional[bool]: + pass + + @mark_no_op + def visit_SimpleWhitespace_value(self, node: "SimpleWhitespace") -> None: + pass + + @mark_no_op + def leave_SimpleWhitespace_value(self, node: "SimpleWhitespace") -> None: + pass + + @mark_no_op + def visit_Slice(self, node: "Slice") -> Optional[bool]: + pass + + @mark_no_op + def visit_Slice_lower(self, node: "Slice") -> None: + pass + + @mark_no_op + def leave_Slice_lower(self, node: "Slice") -> None: + pass + + @mark_no_op + def visit_Slice_upper(self, node: "Slice") -> None: + pass + + @mark_no_op + def leave_Slice_upper(self, node: "Slice") -> None: + pass + + @mark_no_op + def visit_Slice_step(self, node: "Slice") -> None: + pass + + @mark_no_op + def leave_Slice_step(self, node: "Slice") -> None: + pass + + @mark_no_op + def visit_Slice_first_colon(self, node: "Slice") -> None: + pass + + @mark_no_op + def leave_Slice_first_colon(self, node: "Slice") -> None: + pass + + @mark_no_op + def visit_Slice_second_colon(self, node: "Slice") -> None: + pass + + @mark_no_op + def leave_Slice_second_colon(self, node: "Slice") -> None: + pass + + @mark_no_op + def visit_StarredDictElement(self, node: "StarredDictElement") -> Optional[bool]: + pass + + @mark_no_op + def visit_StarredDictElement_value(self, node: "StarredDictElement") -> None: + pass + + @mark_no_op + def leave_StarredDictElement_value(self, node: "StarredDictElement") -> None: + pass + + @mark_no_op + def visit_StarredDictElement_comma(self, node: "StarredDictElement") -> None: + pass + + @mark_no_op + def leave_StarredDictElement_comma(self, node: "StarredDictElement") -> None: + pass + + @mark_no_op + def visit_StarredDictElement_whitespace_before_value( + self, node: "StarredDictElement" + ) -> None: + pass + + @mark_no_op + def leave_StarredDictElement_whitespace_before_value( + self, node: "StarredDictElement" + ) -> None: + pass + + @mark_no_op + def visit_StarredElement(self, node: "StarredElement") -> Optional[bool]: + pass + + @mark_no_op + def visit_StarredElement_value(self, node: "StarredElement") -> None: + pass + + @mark_no_op + def leave_StarredElement_value(self, node: "StarredElement") -> None: + pass + + @mark_no_op + def visit_StarredElement_comma(self, node: "StarredElement") -> None: + pass + + @mark_no_op + def leave_StarredElement_comma(self, node: "StarredElement") -> None: + pass + + @mark_no_op + def visit_StarredElement_lpar(self, node: "StarredElement") -> None: + pass + + @mark_no_op + def leave_StarredElement_lpar(self, node: "StarredElement") -> None: + pass + + @mark_no_op + def visit_StarredElement_rpar(self, node: "StarredElement") -> None: + pass + + @mark_no_op + def leave_StarredElement_rpar(self, node: "StarredElement") -> None: + pass + + @mark_no_op + def visit_StarredElement_whitespace_before_value( + self, node: "StarredElement" + ) -> None: + pass + + @mark_no_op + def leave_StarredElement_whitespace_before_value( + self, node: "StarredElement" + ) -> None: + pass + + @mark_no_op + def visit_Subscript(self, node: "Subscript") -> Optional[bool]: + pass + + @mark_no_op + def visit_Subscript_value(self, node: "Subscript") -> None: + pass + + @mark_no_op + def leave_Subscript_value(self, node: "Subscript") -> None: + pass + + @mark_no_op + def visit_Subscript_slice(self, node: "Subscript") -> None: + pass + + @mark_no_op + def leave_Subscript_slice(self, node: "Subscript") -> None: + pass + + @mark_no_op + def visit_Subscript_lbracket(self, node: "Subscript") -> None: + pass + + @mark_no_op + def leave_Subscript_lbracket(self, node: "Subscript") -> None: + pass + + @mark_no_op + def visit_Subscript_rbracket(self, node: "Subscript") -> None: + pass + + @mark_no_op + def leave_Subscript_rbracket(self, node: "Subscript") -> None: + pass + + @mark_no_op + def visit_Subscript_lpar(self, node: "Subscript") -> None: + pass + + @mark_no_op + def leave_Subscript_lpar(self, node: "Subscript") -> None: + pass + + @mark_no_op + def visit_Subscript_rpar(self, node: "Subscript") -> None: + pass + + @mark_no_op + def leave_Subscript_rpar(self, node: "Subscript") -> None: + pass + + @mark_no_op + def visit_Subscript_whitespace_after_value(self, node: "Subscript") -> None: + pass + + @mark_no_op + def leave_Subscript_whitespace_after_value(self, node: "Subscript") -> None: + pass + + @mark_no_op + def visit_SubscriptElement(self, node: "SubscriptElement") -> Optional[bool]: + pass + + @mark_no_op + def visit_SubscriptElement_slice(self, node: "SubscriptElement") -> None: + pass + + @mark_no_op + def leave_SubscriptElement_slice(self, node: "SubscriptElement") -> None: + pass + + @mark_no_op + def visit_SubscriptElement_comma(self, node: "SubscriptElement") -> None: + pass + + @mark_no_op + def leave_SubscriptElement_comma(self, node: "SubscriptElement") -> None: + pass + + @mark_no_op + def visit_Subtract(self, node: "Subtract") -> Optional[bool]: + pass + + @mark_no_op + def visit_Subtract_whitespace_before(self, node: "Subtract") -> None: + pass + + @mark_no_op + def leave_Subtract_whitespace_before(self, node: "Subtract") -> None: + pass + + @mark_no_op + def visit_Subtract_whitespace_after(self, node: "Subtract") -> None: + pass + + @mark_no_op + def leave_Subtract_whitespace_after(self, node: "Subtract") -> None: + pass + + @mark_no_op + def visit_SubtractAssign(self, node: "SubtractAssign") -> Optional[bool]: + pass + + @mark_no_op + def visit_SubtractAssign_whitespace_before(self, node: "SubtractAssign") -> None: + pass + + @mark_no_op + def leave_SubtractAssign_whitespace_before(self, node: "SubtractAssign") -> None: + pass + + @mark_no_op + def visit_SubtractAssign_whitespace_after(self, node: "SubtractAssign") -> None: + pass + + @mark_no_op + def leave_SubtractAssign_whitespace_after(self, node: "SubtractAssign") -> None: + pass + + @mark_no_op + def visit_TrailingWhitespace(self, node: "TrailingWhitespace") -> Optional[bool]: + pass + + @mark_no_op + def visit_TrailingWhitespace_whitespace(self, node: "TrailingWhitespace") -> None: + pass + + @mark_no_op + def leave_TrailingWhitespace_whitespace(self, node: "TrailingWhitespace") -> None: + pass + + @mark_no_op + def visit_TrailingWhitespace_comment(self, node: "TrailingWhitespace") -> None: + pass + + @mark_no_op + def leave_TrailingWhitespace_comment(self, node: "TrailingWhitespace") -> None: + pass + + @mark_no_op + def visit_TrailingWhitespace_newline(self, node: "TrailingWhitespace") -> None: + pass + + @mark_no_op + def leave_TrailingWhitespace_newline(self, node: "TrailingWhitespace") -> None: + pass + + @mark_no_op + def visit_Try(self, node: "Try") -> Optional[bool]: + pass + + @mark_no_op + def visit_Try_body(self, node: "Try") -> None: + pass + + @mark_no_op + def leave_Try_body(self, node: "Try") -> None: + pass + + @mark_no_op + def visit_Try_handlers(self, node: "Try") -> None: + pass + + @mark_no_op + def leave_Try_handlers(self, node: "Try") -> None: + pass + + @mark_no_op + def visit_Try_orelse(self, node: "Try") -> None: + pass + + @mark_no_op + def leave_Try_orelse(self, node: "Try") -> None: + pass + + @mark_no_op + def visit_Try_finalbody(self, node: "Try") -> None: + pass + + @mark_no_op + def leave_Try_finalbody(self, node: "Try") -> None: + pass + + @mark_no_op + def visit_Try_leading_lines(self, node: "Try") -> None: + pass + + @mark_no_op + def leave_Try_leading_lines(self, node: "Try") -> None: + pass + + @mark_no_op + def visit_Try_whitespace_before_colon(self, node: "Try") -> None: + pass + + @mark_no_op + def leave_Try_whitespace_before_colon(self, node: "Try") -> None: + pass + + @mark_no_op + def visit_TryStar(self, node: "TryStar") -> Optional[bool]: + pass + + @mark_no_op + def visit_TryStar_body(self, node: "TryStar") -> None: + pass + + @mark_no_op + def leave_TryStar_body(self, node: "TryStar") -> None: + pass + + @mark_no_op + def visit_TryStar_handlers(self, node: "TryStar") -> None: + pass + + @mark_no_op + def leave_TryStar_handlers(self, node: "TryStar") -> None: + pass + + @mark_no_op + def visit_TryStar_orelse(self, node: "TryStar") -> None: + pass + + @mark_no_op + def leave_TryStar_orelse(self, node: "TryStar") -> None: + pass + + @mark_no_op + def visit_TryStar_finalbody(self, node: "TryStar") -> None: + pass + + @mark_no_op + def leave_TryStar_finalbody(self, node: "TryStar") -> None: + pass + + @mark_no_op + def visit_TryStar_leading_lines(self, node: "TryStar") -> None: + pass + + @mark_no_op + def leave_TryStar_leading_lines(self, node: "TryStar") -> None: + pass + + @mark_no_op + def visit_TryStar_whitespace_before_colon(self, node: "TryStar") -> None: + pass + + @mark_no_op + def leave_TryStar_whitespace_before_colon(self, node: "TryStar") -> None: + pass + + @mark_no_op + def visit_Tuple(self, node: "Tuple") -> Optional[bool]: + pass + + @mark_no_op + def visit_Tuple_elements(self, node: "Tuple") -> None: + pass + + @mark_no_op + def leave_Tuple_elements(self, node: "Tuple") -> None: + pass + + @mark_no_op + def visit_Tuple_lpar(self, node: "Tuple") -> None: + pass + + @mark_no_op + def leave_Tuple_lpar(self, node: "Tuple") -> None: + pass + + @mark_no_op + def visit_Tuple_rpar(self, node: "Tuple") -> None: + pass + + @mark_no_op + def leave_Tuple_rpar(self, node: "Tuple") -> None: + pass + + @mark_no_op + def visit_TypeAlias(self, node: "TypeAlias") -> Optional[bool]: + pass + + @mark_no_op + def visit_TypeAlias_name(self, node: "TypeAlias") -> None: + pass + + @mark_no_op + def leave_TypeAlias_name(self, node: "TypeAlias") -> None: + pass + + @mark_no_op + def visit_TypeAlias_value(self, node: "TypeAlias") -> None: + pass + + @mark_no_op + def leave_TypeAlias_value(self, node: "TypeAlias") -> None: + pass + + @mark_no_op + def visit_TypeAlias_type_parameters(self, node: "TypeAlias") -> None: + pass + + @mark_no_op + def leave_TypeAlias_type_parameters(self, node: "TypeAlias") -> None: + pass + + @mark_no_op + def visit_TypeAlias_whitespace_after_type(self, node: "TypeAlias") -> None: + pass + + @mark_no_op + def leave_TypeAlias_whitespace_after_type(self, node: "TypeAlias") -> None: + pass + + @mark_no_op + def visit_TypeAlias_whitespace_after_name(self, node: "TypeAlias") -> None: + pass + + @mark_no_op + def leave_TypeAlias_whitespace_after_name(self, node: "TypeAlias") -> None: + pass + + @mark_no_op + def visit_TypeAlias_whitespace_after_type_parameters( + self, node: "TypeAlias" + ) -> None: + pass + + @mark_no_op + def leave_TypeAlias_whitespace_after_type_parameters( + self, node: "TypeAlias" + ) -> None: + pass + + @mark_no_op + def visit_TypeAlias_whitespace_after_equals(self, node: "TypeAlias") -> None: + pass + + @mark_no_op + def leave_TypeAlias_whitespace_after_equals(self, node: "TypeAlias") -> None: + pass + + @mark_no_op + def visit_TypeAlias_semicolon(self, node: "TypeAlias") -> None: + pass + + @mark_no_op + def leave_TypeAlias_semicolon(self, node: "TypeAlias") -> None: + pass + + @mark_no_op + def visit_TypeParam(self, node: "TypeParam") -> Optional[bool]: + pass + + @mark_no_op + def visit_TypeParam_param(self, node: "TypeParam") -> None: + pass + + @mark_no_op + def leave_TypeParam_param(self, node: "TypeParam") -> None: + pass + + @mark_no_op + def visit_TypeParam_comma(self, node: "TypeParam") -> None: + pass + + @mark_no_op + def leave_TypeParam_comma(self, node: "TypeParam") -> None: + pass + + @mark_no_op + def visit_TypeParameters(self, node: "TypeParameters") -> Optional[bool]: + pass + + @mark_no_op + def visit_TypeParameters_params(self, node: "TypeParameters") -> None: + pass + + @mark_no_op + def leave_TypeParameters_params(self, node: "TypeParameters") -> None: + pass + + @mark_no_op + def visit_TypeParameters_lbracket(self, node: "TypeParameters") -> None: + pass + + @mark_no_op + def leave_TypeParameters_lbracket(self, node: "TypeParameters") -> None: + pass + + @mark_no_op + def visit_TypeParameters_rbracket(self, node: "TypeParameters") -> None: + pass + + @mark_no_op + def leave_TypeParameters_rbracket(self, node: "TypeParameters") -> None: + pass + + @mark_no_op + def visit_TypeVar(self, node: "TypeVar") -> Optional[bool]: + pass + + @mark_no_op + def visit_TypeVar_name(self, node: "TypeVar") -> None: + pass + + @mark_no_op + def leave_TypeVar_name(self, node: "TypeVar") -> None: + pass + + @mark_no_op + def visit_TypeVar_bound(self, node: "TypeVar") -> None: + pass + + @mark_no_op + def leave_TypeVar_bound(self, node: "TypeVar") -> None: + pass + + @mark_no_op + def visit_TypeVar_colon(self, node: "TypeVar") -> None: + pass + + @mark_no_op + def leave_TypeVar_colon(self, node: "TypeVar") -> None: + pass + + @mark_no_op + def visit_TypeVarTuple(self, node: "TypeVarTuple") -> Optional[bool]: + pass + + @mark_no_op + def visit_TypeVarTuple_name(self, node: "TypeVarTuple") -> None: + pass + + @mark_no_op + def leave_TypeVarTuple_name(self, node: "TypeVarTuple") -> None: + pass + + @mark_no_op + def visit_TypeVarTuple_whitespace_after_star(self, node: "TypeVarTuple") -> None: + pass + + @mark_no_op + def leave_TypeVarTuple_whitespace_after_star(self, node: "TypeVarTuple") -> None: + pass + + @mark_no_op + def visit_UnaryOperation(self, node: "UnaryOperation") -> Optional[bool]: + pass + + @mark_no_op + def visit_UnaryOperation_operator(self, node: "UnaryOperation") -> None: + pass + + @mark_no_op + def leave_UnaryOperation_operator(self, node: "UnaryOperation") -> None: + pass + + @mark_no_op + def visit_UnaryOperation_expression(self, node: "UnaryOperation") -> None: + pass + + @mark_no_op + def leave_UnaryOperation_expression(self, node: "UnaryOperation") -> None: + pass + + @mark_no_op + def visit_UnaryOperation_lpar(self, node: "UnaryOperation") -> None: + pass + + @mark_no_op + def leave_UnaryOperation_lpar(self, node: "UnaryOperation") -> None: + pass + + @mark_no_op + def visit_UnaryOperation_rpar(self, node: "UnaryOperation") -> None: + pass + + @mark_no_op + def leave_UnaryOperation_rpar(self, node: "UnaryOperation") -> None: + pass + + @mark_no_op + def visit_While(self, node: "While") -> Optional[bool]: + pass + + @mark_no_op + def visit_While_test(self, node: "While") -> None: + pass + + @mark_no_op + def leave_While_test(self, node: "While") -> None: + pass + + @mark_no_op + def visit_While_body(self, node: "While") -> None: + pass + + @mark_no_op + def leave_While_body(self, node: "While") -> None: + pass + + @mark_no_op + def visit_While_orelse(self, node: "While") -> None: + pass + + @mark_no_op + def leave_While_orelse(self, node: "While") -> None: + pass + + @mark_no_op + def visit_While_leading_lines(self, node: "While") -> None: + pass + + @mark_no_op + def leave_While_leading_lines(self, node: "While") -> None: + pass + + @mark_no_op + def visit_While_whitespace_after_while(self, node: "While") -> None: + pass + + @mark_no_op + def leave_While_whitespace_after_while(self, node: "While") -> None: + pass + + @mark_no_op + def visit_While_whitespace_before_colon(self, node: "While") -> None: + pass + + @mark_no_op + def leave_While_whitespace_before_colon(self, node: "While") -> None: + pass + + @mark_no_op + def visit_With(self, node: "With") -> Optional[bool]: + pass + + @mark_no_op + def visit_With_items(self, node: "With") -> None: + pass + + @mark_no_op + def leave_With_items(self, node: "With") -> None: + pass + + @mark_no_op + def visit_With_body(self, node: "With") -> None: + pass + + @mark_no_op + def leave_With_body(self, node: "With") -> None: + pass + + @mark_no_op + def visit_With_asynchronous(self, node: "With") -> None: + pass + + @mark_no_op + def leave_With_asynchronous(self, node: "With") -> None: + pass + + @mark_no_op + def visit_With_leading_lines(self, node: "With") -> None: + pass + + @mark_no_op + def leave_With_leading_lines(self, node: "With") -> None: + pass + + @mark_no_op + def visit_With_lpar(self, node: "With") -> None: + pass + + @mark_no_op + def leave_With_lpar(self, node: "With") -> None: + pass + + @mark_no_op + def visit_With_rpar(self, node: "With") -> None: + pass + + @mark_no_op + def leave_With_rpar(self, node: "With") -> None: + pass + + @mark_no_op + def visit_With_whitespace_after_with(self, node: "With") -> None: + pass + + @mark_no_op + def leave_With_whitespace_after_with(self, node: "With") -> None: + pass + + @mark_no_op + def visit_With_whitespace_before_colon(self, node: "With") -> None: + pass + + @mark_no_op + def leave_With_whitespace_before_colon(self, node: "With") -> None: + pass + + @mark_no_op + def visit_WithItem(self, node: "WithItem") -> Optional[bool]: + pass + + @mark_no_op + def visit_WithItem_item(self, node: "WithItem") -> None: + pass + + @mark_no_op + def leave_WithItem_item(self, node: "WithItem") -> None: + pass + + @mark_no_op + def visit_WithItem_asname(self, node: "WithItem") -> None: + pass + + @mark_no_op + def leave_WithItem_asname(self, node: "WithItem") -> None: + pass + + @mark_no_op + def visit_WithItem_comma(self, node: "WithItem") -> None: + pass + + @mark_no_op + def leave_WithItem_comma(self, node: "WithItem") -> None: + pass + + @mark_no_op + def visit_Yield(self, node: "Yield") -> Optional[bool]: + pass + + @mark_no_op + def visit_Yield_value(self, node: "Yield") -> None: + pass + + @mark_no_op + def leave_Yield_value(self, node: "Yield") -> None: + pass + + @mark_no_op + def visit_Yield_lpar(self, node: "Yield") -> None: + pass + + @mark_no_op + def leave_Yield_lpar(self, node: "Yield") -> None: + pass + + @mark_no_op + def visit_Yield_rpar(self, node: "Yield") -> None: + pass + + @mark_no_op + def leave_Yield_rpar(self, node: "Yield") -> None: + pass + + @mark_no_op + def visit_Yield_whitespace_after_yield(self, node: "Yield") -> None: + pass + + @mark_no_op + def leave_Yield_whitespace_after_yield(self, node: "Yield") -> None: + pass + + +class CSTTypedVisitorFunctions(CSTTypedBaseFunctions): + @mark_no_op + def leave_Add(self, original_node: "Add") -> None: + pass + + @mark_no_op + def leave_AddAssign(self, original_node: "AddAssign") -> None: + pass + + @mark_no_op + def leave_And(self, original_node: "And") -> None: + pass + + @mark_no_op + def leave_AnnAssign(self, original_node: "AnnAssign") -> None: + pass + + @mark_no_op + def leave_Annotation(self, original_node: "Annotation") -> None: + pass + + @mark_no_op + def leave_Arg(self, original_node: "Arg") -> None: + pass + + @mark_no_op + def leave_AsName(self, original_node: "AsName") -> None: + pass + + @mark_no_op + def leave_Assert(self, original_node: "Assert") -> None: + pass + + @mark_no_op + def leave_Assign(self, original_node: "Assign") -> None: + pass + + @mark_no_op + def leave_AssignEqual(self, original_node: "AssignEqual") -> None: + pass + + @mark_no_op + def leave_AssignTarget(self, original_node: "AssignTarget") -> None: + pass + + @mark_no_op + def leave_Asynchronous(self, original_node: "Asynchronous") -> None: + pass + + @mark_no_op + def leave_Attribute(self, original_node: "Attribute") -> None: + pass + + @mark_no_op + def leave_AugAssign(self, original_node: "AugAssign") -> None: + pass + + @mark_no_op + def leave_Await(self, original_node: "Await") -> None: + pass + + @mark_no_op + def leave_BinaryOperation(self, original_node: "BinaryOperation") -> None: + pass + + @mark_no_op + def leave_BitAnd(self, original_node: "BitAnd") -> None: + pass + + @mark_no_op + def leave_BitAndAssign(self, original_node: "BitAndAssign") -> None: + pass + + @mark_no_op + def leave_BitInvert(self, original_node: "BitInvert") -> None: + pass + + @mark_no_op + def leave_BitOr(self, original_node: "BitOr") -> None: + pass + + @mark_no_op + def leave_BitOrAssign(self, original_node: "BitOrAssign") -> None: + pass + + @mark_no_op + def leave_BitXor(self, original_node: "BitXor") -> None: + pass + + @mark_no_op + def leave_BitXorAssign(self, original_node: "BitXorAssign") -> None: + pass + + @mark_no_op + def leave_BooleanOperation(self, original_node: "BooleanOperation") -> None: + pass + + @mark_no_op + def leave_Break(self, original_node: "Break") -> None: + pass + + @mark_no_op + def leave_Call(self, original_node: "Call") -> None: + pass + + @mark_no_op + def leave_ClassDef(self, original_node: "ClassDef") -> None: + pass + + @mark_no_op + def leave_Colon(self, original_node: "Colon") -> None: + pass + + @mark_no_op + def leave_Comma(self, original_node: "Comma") -> None: + pass + + @mark_no_op + def leave_Comment(self, original_node: "Comment") -> None: + pass + + @mark_no_op + def leave_CompFor(self, original_node: "CompFor") -> None: + pass + + @mark_no_op + def leave_CompIf(self, original_node: "CompIf") -> None: + pass + + @mark_no_op + def leave_Comparison(self, original_node: "Comparison") -> None: + pass + + @mark_no_op + def leave_ComparisonTarget(self, original_node: "ComparisonTarget") -> None: + pass + + @mark_no_op + def leave_ConcatenatedString(self, original_node: "ConcatenatedString") -> None: + pass + + @mark_no_op + def leave_Continue(self, original_node: "Continue") -> None: + pass + + @mark_no_op + def leave_Decorator(self, original_node: "Decorator") -> None: + pass + + @mark_no_op + def leave_Del(self, original_node: "Del") -> None: + pass + + @mark_no_op + def leave_Dict(self, original_node: "Dict") -> None: + pass + + @mark_no_op + def leave_DictComp(self, original_node: "DictComp") -> None: + pass + + @mark_no_op + def leave_DictElement(self, original_node: "DictElement") -> None: + pass + + @mark_no_op + def leave_Divide(self, original_node: "Divide") -> None: + pass + + @mark_no_op + def leave_DivideAssign(self, original_node: "DivideAssign") -> None: + pass + + @mark_no_op + def leave_Dot(self, original_node: "Dot") -> None: + pass + + @mark_no_op + def leave_Element(self, original_node: "Element") -> None: + pass + + @mark_no_op + def leave_Ellipsis(self, original_node: "Ellipsis") -> None: + pass + + @mark_no_op + def leave_Else(self, original_node: "Else") -> None: + pass + + @mark_no_op + def leave_EmptyLine(self, original_node: "EmptyLine") -> None: + pass + + @mark_no_op + def leave_Equal(self, original_node: "Equal") -> None: + pass + + @mark_no_op + def leave_ExceptHandler(self, original_node: "ExceptHandler") -> None: + pass + + @mark_no_op + def leave_ExceptStarHandler(self, original_node: "ExceptStarHandler") -> None: + pass + + @mark_no_op + def leave_Expr(self, original_node: "Expr") -> None: + pass + + @mark_no_op + def leave_Finally(self, original_node: "Finally") -> None: + pass + + @mark_no_op + def leave_Float(self, original_node: "Float") -> None: + pass + + @mark_no_op + def leave_FloorDivide(self, original_node: "FloorDivide") -> None: + pass + + @mark_no_op + def leave_FloorDivideAssign(self, original_node: "FloorDivideAssign") -> None: + pass + + @mark_no_op + def leave_For(self, original_node: "For") -> None: + pass + + @mark_no_op + def leave_FormattedString(self, original_node: "FormattedString") -> None: + pass + + @mark_no_op + def leave_FormattedStringExpression( + self, original_node: "FormattedStringExpression" + ) -> None: + pass + + @mark_no_op + def leave_FormattedStringText(self, original_node: "FormattedStringText") -> None: + pass + + @mark_no_op + def leave_From(self, original_node: "From") -> None: + pass + + @mark_no_op + def leave_FunctionDef(self, original_node: "FunctionDef") -> None: + pass + + @mark_no_op + def leave_GeneratorExp(self, original_node: "GeneratorExp") -> None: + pass + + @mark_no_op + def leave_Global(self, original_node: "Global") -> None: + pass + + @mark_no_op + def leave_GreaterThan(self, original_node: "GreaterThan") -> None: + pass + + @mark_no_op + def leave_GreaterThanEqual(self, original_node: "GreaterThanEqual") -> None: + pass + + @mark_no_op + def leave_If(self, original_node: "If") -> None: + pass + + @mark_no_op + def leave_IfExp(self, original_node: "IfExp") -> None: + pass + + @mark_no_op + def leave_Imaginary(self, original_node: "Imaginary") -> None: + pass + + @mark_no_op + def leave_Import(self, original_node: "Import") -> None: + pass + + @mark_no_op + def leave_ImportAlias(self, original_node: "ImportAlias") -> None: + pass + + @mark_no_op + def leave_ImportFrom(self, original_node: "ImportFrom") -> None: + pass + + @mark_no_op + def leave_ImportStar(self, original_node: "ImportStar") -> None: + pass + + @mark_no_op + def leave_In(self, original_node: "In") -> None: + pass + + @mark_no_op + def leave_IndentedBlock(self, original_node: "IndentedBlock") -> None: + pass + + @mark_no_op + def leave_Index(self, original_node: "Index") -> None: + pass + + @mark_no_op + def leave_Integer(self, original_node: "Integer") -> None: + pass + + @mark_no_op + def leave_Is(self, original_node: "Is") -> None: + pass + + @mark_no_op + def leave_IsNot(self, original_node: "IsNot") -> None: + pass + + @mark_no_op + def leave_Lambda(self, original_node: "Lambda") -> None: + pass + + @mark_no_op + def leave_LeftCurlyBrace(self, original_node: "LeftCurlyBrace") -> None: + pass + + @mark_no_op + def leave_LeftParen(self, original_node: "LeftParen") -> None: + pass + + @mark_no_op + def leave_LeftShift(self, original_node: "LeftShift") -> None: + pass + + @mark_no_op + def leave_LeftShiftAssign(self, original_node: "LeftShiftAssign") -> None: + pass + + @mark_no_op + def leave_LeftSquareBracket(self, original_node: "LeftSquareBracket") -> None: + pass + + @mark_no_op + def leave_LessThan(self, original_node: "LessThan") -> None: + pass + + @mark_no_op + def leave_LessThanEqual(self, original_node: "LessThanEqual") -> None: + pass + + @mark_no_op + def leave_List(self, original_node: "List") -> None: + pass + + @mark_no_op + def leave_ListComp(self, original_node: "ListComp") -> None: + pass + + @mark_no_op + def leave_Match(self, original_node: "Match") -> None: + pass + + @mark_no_op + def leave_MatchAs(self, original_node: "MatchAs") -> None: + pass + + @mark_no_op + def leave_MatchCase(self, original_node: "MatchCase") -> None: + pass + + @mark_no_op + def leave_MatchClass(self, original_node: "MatchClass") -> None: + pass + + @mark_no_op + def leave_MatchKeywordElement(self, original_node: "MatchKeywordElement") -> None: + pass + + @mark_no_op + def leave_MatchList(self, original_node: "MatchList") -> None: + pass + + @mark_no_op + def leave_MatchMapping(self, original_node: "MatchMapping") -> None: + pass + + @mark_no_op + def leave_MatchMappingElement(self, original_node: "MatchMappingElement") -> None: + pass + + @mark_no_op + def leave_MatchOr(self, original_node: "MatchOr") -> None: + pass + + @mark_no_op + def leave_MatchOrElement(self, original_node: "MatchOrElement") -> None: + pass + + @mark_no_op + def leave_MatchPattern(self, original_node: "MatchPattern") -> None: + pass + + @mark_no_op + def leave_MatchSequence(self, original_node: "MatchSequence") -> None: + pass + + @mark_no_op + def leave_MatchSequenceElement(self, original_node: "MatchSequenceElement") -> None: + pass + + @mark_no_op + def leave_MatchSingleton(self, original_node: "MatchSingleton") -> None: + pass + + @mark_no_op + def leave_MatchStar(self, original_node: "MatchStar") -> None: + pass + + @mark_no_op + def leave_MatchTuple(self, original_node: "MatchTuple") -> None: + pass + + @mark_no_op + def leave_MatchValue(self, original_node: "MatchValue") -> None: + pass + + @mark_no_op + def leave_MatrixMultiply(self, original_node: "MatrixMultiply") -> None: + pass + + @mark_no_op + def leave_MatrixMultiplyAssign(self, original_node: "MatrixMultiplyAssign") -> None: + pass + + @mark_no_op + def leave_Minus(self, original_node: "Minus") -> None: + pass + + @mark_no_op + def leave_Module(self, original_node: "Module") -> None: + pass + + @mark_no_op + def leave_Modulo(self, original_node: "Modulo") -> None: + pass + + @mark_no_op + def leave_ModuloAssign(self, original_node: "ModuloAssign") -> None: + pass + + @mark_no_op + def leave_Multiply(self, original_node: "Multiply") -> None: + pass + + @mark_no_op + def leave_MultiplyAssign(self, original_node: "MultiplyAssign") -> None: + pass + + @mark_no_op + def leave_Name(self, original_node: "Name") -> None: + pass + + @mark_no_op + def leave_NameItem(self, original_node: "NameItem") -> None: + pass + + @mark_no_op + def leave_NamedExpr(self, original_node: "NamedExpr") -> None: + pass + + @mark_no_op + def leave_Newline(self, original_node: "Newline") -> None: + pass + + @mark_no_op + def leave_Nonlocal(self, original_node: "Nonlocal") -> None: + pass + + @mark_no_op + def leave_Not(self, original_node: "Not") -> None: + pass + + @mark_no_op + def leave_NotEqual(self, original_node: "NotEqual") -> None: + pass + + @mark_no_op + def leave_NotIn(self, original_node: "NotIn") -> None: + pass + + @mark_no_op + def leave_Or(self, original_node: "Or") -> None: + pass + + @mark_no_op + def leave_Param(self, original_node: "Param") -> None: + pass + + @mark_no_op + def leave_ParamSlash(self, original_node: "ParamSlash") -> None: + pass + + @mark_no_op + def leave_ParamSpec(self, original_node: "ParamSpec") -> None: + pass + + @mark_no_op + def leave_ParamStar(self, original_node: "ParamStar") -> None: + pass + + @mark_no_op + def leave_Parameters(self, original_node: "Parameters") -> None: + pass + + @mark_no_op + def leave_ParenthesizedWhitespace( + self, original_node: "ParenthesizedWhitespace" + ) -> None: + pass + + @mark_no_op + def leave_Pass(self, original_node: "Pass") -> None: + pass + + @mark_no_op + def leave_Plus(self, original_node: "Plus") -> None: + pass + + @mark_no_op + def leave_Power(self, original_node: "Power") -> None: + pass + + @mark_no_op + def leave_PowerAssign(self, original_node: "PowerAssign") -> None: + pass + + @mark_no_op + def leave_Raise(self, original_node: "Raise") -> None: + pass + + @mark_no_op + def leave_Return(self, original_node: "Return") -> None: + pass + + @mark_no_op + def leave_RightCurlyBrace(self, original_node: "RightCurlyBrace") -> None: + pass + + @mark_no_op + def leave_RightParen(self, original_node: "RightParen") -> None: + pass + + @mark_no_op + def leave_RightShift(self, original_node: "RightShift") -> None: + pass + + @mark_no_op + def leave_RightShiftAssign(self, original_node: "RightShiftAssign") -> None: + pass + + @mark_no_op + def leave_RightSquareBracket(self, original_node: "RightSquareBracket") -> None: + pass + + @mark_no_op + def leave_Semicolon(self, original_node: "Semicolon") -> None: + pass + + @mark_no_op + def leave_Set(self, original_node: "Set") -> None: + pass + + @mark_no_op + def leave_SetComp(self, original_node: "SetComp") -> None: + pass + + @mark_no_op + def leave_SimpleStatementLine(self, original_node: "SimpleStatementLine") -> None: + pass + + @mark_no_op + def leave_SimpleStatementSuite(self, original_node: "SimpleStatementSuite") -> None: + pass + + @mark_no_op + def leave_SimpleString(self, original_node: "SimpleString") -> None: + pass + + @mark_no_op + def leave_SimpleWhitespace(self, original_node: "SimpleWhitespace") -> None: + pass + + @mark_no_op + def leave_Slice(self, original_node: "Slice") -> None: + pass + + @mark_no_op + def leave_StarredDictElement(self, original_node: "StarredDictElement") -> None: + pass + + @mark_no_op + def leave_StarredElement(self, original_node: "StarredElement") -> None: + pass + + @mark_no_op + def leave_Subscript(self, original_node: "Subscript") -> None: + pass + + @mark_no_op + def leave_SubscriptElement(self, original_node: "SubscriptElement") -> None: + pass + + @mark_no_op + def leave_Subtract(self, original_node: "Subtract") -> None: + pass + + @mark_no_op + def leave_SubtractAssign(self, original_node: "SubtractAssign") -> None: + pass + + @mark_no_op + def leave_TrailingWhitespace(self, original_node: "TrailingWhitespace") -> None: + pass + + @mark_no_op + def leave_Try(self, original_node: "Try") -> None: + pass + + @mark_no_op + def leave_TryStar(self, original_node: "TryStar") -> None: + pass + + @mark_no_op + def leave_Tuple(self, original_node: "Tuple") -> None: + pass + + @mark_no_op + def leave_TypeAlias(self, original_node: "TypeAlias") -> None: + pass + + @mark_no_op + def leave_TypeParam(self, original_node: "TypeParam") -> None: + pass + + @mark_no_op + def leave_TypeParameters(self, original_node: "TypeParameters") -> None: + pass + + @mark_no_op + def leave_TypeVar(self, original_node: "TypeVar") -> None: + pass + + @mark_no_op + def leave_TypeVarTuple(self, original_node: "TypeVarTuple") -> None: + pass + + @mark_no_op + def leave_UnaryOperation(self, original_node: "UnaryOperation") -> None: + pass + + @mark_no_op + def leave_While(self, original_node: "While") -> None: + pass + + @mark_no_op + def leave_With(self, original_node: "With") -> None: + pass + + @mark_no_op + def leave_WithItem(self, original_node: "WithItem") -> None: + pass + + @mark_no_op + def leave_Yield(self, original_node: "Yield") -> None: + pass + + +class CSTTypedTransformerFunctions(CSTTypedBaseFunctions): + @mark_no_op + def leave_Add(self, original_node: "Add", updated_node: "Add") -> "BaseBinaryOp": + return updated_node + + @mark_no_op + def leave_AddAssign( + self, original_node: "AddAssign", updated_node: "AddAssign" + ) -> "BaseAugOp": + return updated_node + + @mark_no_op + def leave_And(self, original_node: "And", updated_node: "And") -> "BaseBooleanOp": + return updated_node + + @mark_no_op + def leave_AnnAssign( + self, original_node: "AnnAssign", updated_node: "AnnAssign" + ) -> Union[ + "BaseSmallStatement", FlattenSentinel["BaseSmallStatement"], RemovalSentinel + ]: + return updated_node + + @mark_no_op + def leave_Annotation( + self, original_node: "Annotation", updated_node: "Annotation" + ) -> "Annotation": + return updated_node + + @mark_no_op + def leave_Arg( + self, original_node: "Arg", updated_node: "Arg" + ) -> Union["Arg", FlattenSentinel["Arg"], RemovalSentinel]: + return updated_node + + @mark_no_op + def leave_AsName(self, original_node: "AsName", updated_node: "AsName") -> "AsName": + return updated_node + + @mark_no_op + def leave_Assert( + self, original_node: "Assert", updated_node: "Assert" + ) -> Union[ + "BaseSmallStatement", FlattenSentinel["BaseSmallStatement"], RemovalSentinel + ]: + return updated_node + + @mark_no_op + def leave_Assign( + self, original_node: "Assign", updated_node: "Assign" + ) -> Union[ + "BaseSmallStatement", FlattenSentinel["BaseSmallStatement"], RemovalSentinel + ]: + return updated_node + + @mark_no_op + def leave_AssignEqual( + self, original_node: "AssignEqual", updated_node: "AssignEqual" + ) -> Union["AssignEqual", MaybeSentinel]: + return updated_node + + @mark_no_op + def leave_AssignTarget( + self, original_node: "AssignTarget", updated_node: "AssignTarget" + ) -> Union["AssignTarget", FlattenSentinel["AssignTarget"], RemovalSentinel]: + return updated_node + + @mark_no_op + def leave_Asynchronous( + self, original_node: "Asynchronous", updated_node: "Asynchronous" + ) -> "Asynchronous": + return updated_node + + @mark_no_op + def leave_Attribute( + self, original_node: "Attribute", updated_node: "Attribute" + ) -> "BaseExpression": + return updated_node + + @mark_no_op + def leave_AugAssign( + self, original_node: "AugAssign", updated_node: "AugAssign" + ) -> Union[ + "BaseSmallStatement", FlattenSentinel["BaseSmallStatement"], RemovalSentinel + ]: + return updated_node + + @mark_no_op + def leave_Await( + self, original_node: "Await", updated_node: "Await" + ) -> "BaseExpression": + return updated_node + + @mark_no_op + def leave_BinaryOperation( + self, original_node: "BinaryOperation", updated_node: "BinaryOperation" + ) -> "BaseExpression": + return updated_node + + @mark_no_op + def leave_BitAnd( + self, original_node: "BitAnd", updated_node: "BitAnd" + ) -> "BaseBinaryOp": + return updated_node + + @mark_no_op + def leave_BitAndAssign( + self, original_node: "BitAndAssign", updated_node: "BitAndAssign" + ) -> "BaseAugOp": + return updated_node + + @mark_no_op + def leave_BitInvert( + self, original_node: "BitInvert", updated_node: "BitInvert" + ) -> "BaseUnaryOp": + return updated_node + + @mark_no_op + def leave_BitOr( + self, original_node: "BitOr", updated_node: "BitOr" + ) -> Union["BaseBinaryOp", MaybeSentinel]: + return updated_node + + @mark_no_op + def leave_BitOrAssign( + self, original_node: "BitOrAssign", updated_node: "BitOrAssign" + ) -> "BaseAugOp": + return updated_node + + @mark_no_op + def leave_BitXor( + self, original_node: "BitXor", updated_node: "BitXor" + ) -> "BaseBinaryOp": + return updated_node + + @mark_no_op + def leave_BitXorAssign( + self, original_node: "BitXorAssign", updated_node: "BitXorAssign" + ) -> "BaseAugOp": + return updated_node + + @mark_no_op + def leave_BooleanOperation( + self, original_node: "BooleanOperation", updated_node: "BooleanOperation" + ) -> "BaseExpression": + return updated_node + + @mark_no_op + def leave_Break( + self, original_node: "Break", updated_node: "Break" + ) -> Union[ + "BaseSmallStatement", FlattenSentinel["BaseSmallStatement"], RemovalSentinel + ]: + return updated_node + + @mark_no_op + def leave_Call( + self, original_node: "Call", updated_node: "Call" + ) -> "BaseExpression": + return updated_node + + @mark_no_op + def leave_ClassDef( + self, original_node: "ClassDef", updated_node: "ClassDef" + ) -> Union["BaseStatement", FlattenSentinel["BaseStatement"], RemovalSentinel]: + return updated_node + + @mark_no_op + def leave_Colon( + self, original_node: "Colon", updated_node: "Colon" + ) -> Union["Colon", MaybeSentinel]: + return updated_node + + @mark_no_op + def leave_Comma( + self, original_node: "Comma", updated_node: "Comma" + ) -> Union["Comma", MaybeSentinel]: + return updated_node + + @mark_no_op + def leave_Comment( + self, original_node: "Comment", updated_node: "Comment" + ) -> "Comment": + return updated_node + + @mark_no_op + def leave_CompFor( + self, original_node: "CompFor", updated_node: "CompFor" + ) -> "CompFor": + return updated_node + + @mark_no_op + def leave_CompIf(self, original_node: "CompIf", updated_node: "CompIf") -> "CompIf": + return updated_node + + @mark_no_op + def leave_Comparison( + self, original_node: "Comparison", updated_node: "Comparison" + ) -> "BaseExpression": + return updated_node + + @mark_no_op + def leave_ComparisonTarget( + self, original_node: "ComparisonTarget", updated_node: "ComparisonTarget" + ) -> Union[ + "ComparisonTarget", FlattenSentinel["ComparisonTarget"], RemovalSentinel + ]: + return updated_node + + @mark_no_op + def leave_ConcatenatedString( + self, original_node: "ConcatenatedString", updated_node: "ConcatenatedString" + ) -> "BaseExpression": + return updated_node + + @mark_no_op + def leave_Continue( + self, original_node: "Continue", updated_node: "Continue" + ) -> Union[ + "BaseSmallStatement", FlattenSentinel["BaseSmallStatement"], RemovalSentinel + ]: + return updated_node + + @mark_no_op + def leave_Decorator( + self, original_node: "Decorator", updated_node: "Decorator" + ) -> Union["Decorator", FlattenSentinel["Decorator"], RemovalSentinel]: + return updated_node + + @mark_no_op + def leave_Del( + self, original_node: "Del", updated_node: "Del" + ) -> Union[ + "BaseSmallStatement", FlattenSentinel["BaseSmallStatement"], RemovalSentinel + ]: + return updated_node + + @mark_no_op + def leave_Dict( + self, original_node: "Dict", updated_node: "Dict" + ) -> "BaseExpression": + return updated_node + + @mark_no_op + def leave_DictComp( + self, original_node: "DictComp", updated_node: "DictComp" + ) -> "BaseExpression": + return updated_node + + @mark_no_op + def leave_DictElement( + self, original_node: "DictElement", updated_node: "DictElement" + ) -> Union["BaseDictElement", FlattenSentinel["BaseDictElement"], RemovalSentinel]: + return updated_node + + @mark_no_op + def leave_Divide( + self, original_node: "Divide", updated_node: "Divide" + ) -> "BaseBinaryOp": + return updated_node + + @mark_no_op + def leave_DivideAssign( + self, original_node: "DivideAssign", updated_node: "DivideAssign" + ) -> "BaseAugOp": + return updated_node + + @mark_no_op + def leave_Dot( + self, original_node: "Dot", updated_node: "Dot" + ) -> Union["Dot", FlattenSentinel["Dot"], RemovalSentinel]: + return updated_node + + @mark_no_op + def leave_Element( + self, original_node: "Element", updated_node: "Element" + ) -> Union["BaseElement", FlattenSentinel["BaseElement"], RemovalSentinel]: + return updated_node + + @mark_no_op + def leave_Ellipsis( + self, original_node: "Ellipsis", updated_node: "Ellipsis" + ) -> "BaseExpression": + return updated_node + + @mark_no_op + def leave_Else(self, original_node: "Else", updated_node: "Else") -> "Else": + return updated_node + + @mark_no_op + def leave_EmptyLine( + self, original_node: "EmptyLine", updated_node: "EmptyLine" + ) -> Union["EmptyLine", FlattenSentinel["EmptyLine"], RemovalSentinel]: + return updated_node + + @mark_no_op + def leave_Equal( + self, original_node: "Equal", updated_node: "Equal" + ) -> "BaseCompOp": + return updated_node + + @mark_no_op + def leave_ExceptHandler( + self, original_node: "ExceptHandler", updated_node: "ExceptHandler" + ) -> Union["ExceptHandler", FlattenSentinel["ExceptHandler"], RemovalSentinel]: + return updated_node + + @mark_no_op + def leave_ExceptStarHandler( + self, original_node: "ExceptStarHandler", updated_node: "ExceptStarHandler" + ) -> Union[ + "ExceptStarHandler", FlattenSentinel["ExceptStarHandler"], RemovalSentinel + ]: + return updated_node + + @mark_no_op + def leave_Expr( + self, original_node: "Expr", updated_node: "Expr" + ) -> Union[ + "BaseSmallStatement", FlattenSentinel["BaseSmallStatement"], RemovalSentinel + ]: + return updated_node + + @mark_no_op + def leave_Finally( + self, original_node: "Finally", updated_node: "Finally" + ) -> "Finally": + return updated_node + + @mark_no_op + def leave_Float( + self, original_node: "Float", updated_node: "Float" + ) -> "BaseExpression": + return updated_node + + @mark_no_op + def leave_FloorDivide( + self, original_node: "FloorDivide", updated_node: "FloorDivide" + ) -> "BaseBinaryOp": + return updated_node + + @mark_no_op + def leave_FloorDivideAssign( + self, original_node: "FloorDivideAssign", updated_node: "FloorDivideAssign" + ) -> "BaseAugOp": + return updated_node + + @mark_no_op + def leave_For( + self, original_node: "For", updated_node: "For" + ) -> Union["BaseStatement", FlattenSentinel["BaseStatement"], RemovalSentinel]: + return updated_node + + @mark_no_op + def leave_FormattedString( + self, original_node: "FormattedString", updated_node: "FormattedString" + ) -> "BaseExpression": + return updated_node + + @mark_no_op + def leave_FormattedStringExpression( + self, + original_node: "FormattedStringExpression", + updated_node: "FormattedStringExpression", + ) -> Union[ + "BaseFormattedStringContent", + FlattenSentinel["BaseFormattedStringContent"], + RemovalSentinel, + ]: + return updated_node + + @mark_no_op + def leave_FormattedStringText( + self, original_node: "FormattedStringText", updated_node: "FormattedStringText" + ) -> Union[ + "BaseFormattedStringContent", + FlattenSentinel["BaseFormattedStringContent"], + RemovalSentinel, + ]: + return updated_node + + @mark_no_op + def leave_From(self, original_node: "From", updated_node: "From") -> "From": + return updated_node + + @mark_no_op + def leave_FunctionDef( + self, original_node: "FunctionDef", updated_node: "FunctionDef" + ) -> Union["BaseStatement", FlattenSentinel["BaseStatement"], RemovalSentinel]: + return updated_node + + @mark_no_op + def leave_GeneratorExp( + self, original_node: "GeneratorExp", updated_node: "GeneratorExp" + ) -> "BaseExpression": + return updated_node + + @mark_no_op + def leave_Global( + self, original_node: "Global", updated_node: "Global" + ) -> Union[ + "BaseSmallStatement", FlattenSentinel["BaseSmallStatement"], RemovalSentinel + ]: + return updated_node + + @mark_no_op + def leave_GreaterThan( + self, original_node: "GreaterThan", updated_node: "GreaterThan" + ) -> "BaseCompOp": + return updated_node + + @mark_no_op + def leave_GreaterThanEqual( + self, original_node: "GreaterThanEqual", updated_node: "GreaterThanEqual" + ) -> "BaseCompOp": + return updated_node + + @mark_no_op + def leave_If( + self, original_node: "If", updated_node: "If" + ) -> Union["BaseStatement", FlattenSentinel["BaseStatement"], RemovalSentinel]: + return updated_node + + @mark_no_op + def leave_IfExp( + self, original_node: "IfExp", updated_node: "IfExp" + ) -> "BaseExpression": + return updated_node + + @mark_no_op + def leave_Imaginary( + self, original_node: "Imaginary", updated_node: "Imaginary" + ) -> "BaseExpression": + return updated_node + + @mark_no_op + def leave_Import( + self, original_node: "Import", updated_node: "Import" + ) -> Union[ + "BaseSmallStatement", FlattenSentinel["BaseSmallStatement"], RemovalSentinel + ]: + return updated_node + + @mark_no_op + def leave_ImportAlias( + self, original_node: "ImportAlias", updated_node: "ImportAlias" + ) -> Union["ImportAlias", FlattenSentinel["ImportAlias"], RemovalSentinel]: + return updated_node + + @mark_no_op + def leave_ImportFrom( + self, original_node: "ImportFrom", updated_node: "ImportFrom" + ) -> Union[ + "BaseSmallStatement", FlattenSentinel["BaseSmallStatement"], RemovalSentinel + ]: + return updated_node + + @mark_no_op + def leave_ImportStar( + self, original_node: "ImportStar", updated_node: "ImportStar" + ) -> "ImportStar": + return updated_node + + @mark_no_op + def leave_In(self, original_node: "In", updated_node: "In") -> "BaseCompOp": + return updated_node + + @mark_no_op + def leave_IndentedBlock( + self, original_node: "IndentedBlock", updated_node: "IndentedBlock" + ) -> "BaseSuite": + return updated_node + + @mark_no_op + def leave_Index(self, original_node: "Index", updated_node: "Index") -> "BaseSlice": + return updated_node + + @mark_no_op + def leave_Integer( + self, original_node: "Integer", updated_node: "Integer" + ) -> "BaseExpression": + return updated_node + + @mark_no_op + def leave_Is(self, original_node: "Is", updated_node: "Is") -> "BaseCompOp": + return updated_node + + @mark_no_op + def leave_IsNot( + self, original_node: "IsNot", updated_node: "IsNot" + ) -> "BaseCompOp": + return updated_node + + @mark_no_op + def leave_Lambda( + self, original_node: "Lambda", updated_node: "Lambda" + ) -> "BaseExpression": + return updated_node + + @mark_no_op + def leave_LeftCurlyBrace( + self, original_node: "LeftCurlyBrace", updated_node: "LeftCurlyBrace" + ) -> "LeftCurlyBrace": + return updated_node + + @mark_no_op + def leave_LeftParen( + self, original_node: "LeftParen", updated_node: "LeftParen" + ) -> Union[ + "LeftParen", MaybeSentinel, FlattenSentinel["LeftParen"], RemovalSentinel + ]: + return updated_node + + @mark_no_op + def leave_LeftShift( + self, original_node: "LeftShift", updated_node: "LeftShift" + ) -> "BaseBinaryOp": + return updated_node + + @mark_no_op + def leave_LeftShiftAssign( + self, original_node: "LeftShiftAssign", updated_node: "LeftShiftAssign" + ) -> "BaseAugOp": + return updated_node + + @mark_no_op + def leave_LeftSquareBracket( + self, original_node: "LeftSquareBracket", updated_node: "LeftSquareBracket" + ) -> "LeftSquareBracket": + return updated_node + + @mark_no_op + def leave_LessThan( + self, original_node: "LessThan", updated_node: "LessThan" + ) -> "BaseCompOp": + return updated_node + + @mark_no_op + def leave_LessThanEqual( + self, original_node: "LessThanEqual", updated_node: "LessThanEqual" + ) -> "BaseCompOp": + return updated_node + + @mark_no_op + def leave_List( + self, original_node: "List", updated_node: "List" + ) -> "BaseExpression": + return updated_node + + @mark_no_op + def leave_ListComp( + self, original_node: "ListComp", updated_node: "ListComp" + ) -> "BaseExpression": + return updated_node + + @mark_no_op + def leave_Match( + self, original_node: "Match", updated_node: "Match" + ) -> Union["BaseStatement", FlattenSentinel["BaseStatement"], RemovalSentinel]: + return updated_node + + @mark_no_op + def leave_MatchAs( + self, original_node: "MatchAs", updated_node: "MatchAs" + ) -> "MatchPattern": + return updated_node + + @mark_no_op + def leave_MatchCase( + self, original_node: "MatchCase", updated_node: "MatchCase" + ) -> "MatchCase": + return updated_node + + @mark_no_op + def leave_MatchClass( + self, original_node: "MatchClass", updated_node: "MatchClass" + ) -> "MatchPattern": + return updated_node + + @mark_no_op + def leave_MatchKeywordElement( + self, original_node: "MatchKeywordElement", updated_node: "MatchKeywordElement" + ) -> Union[ + "MatchKeywordElement", FlattenSentinel["MatchKeywordElement"], RemovalSentinel + ]: + return updated_node + + @mark_no_op + def leave_MatchList( + self, original_node: "MatchList", updated_node: "MatchList" + ) -> "MatchPattern": + return updated_node + + @mark_no_op + def leave_MatchMapping( + self, original_node: "MatchMapping", updated_node: "MatchMapping" + ) -> "MatchPattern": + return updated_node + + @mark_no_op + def leave_MatchMappingElement( + self, original_node: "MatchMappingElement", updated_node: "MatchMappingElement" + ) -> Union[ + "MatchMappingElement", FlattenSentinel["MatchMappingElement"], RemovalSentinel + ]: + return updated_node + + @mark_no_op + def leave_MatchOr( + self, original_node: "MatchOr", updated_node: "MatchOr" + ) -> "MatchPattern": + return updated_node + + @mark_no_op + def leave_MatchOrElement( + self, original_node: "MatchOrElement", updated_node: "MatchOrElement" + ) -> Union["MatchOrElement", FlattenSentinel["MatchOrElement"], RemovalSentinel]: + return updated_node + + @mark_no_op + def leave_MatchPattern( + self, original_node: "MatchPattern", updated_node: "MatchPattern" + ) -> "MatchPattern": + return updated_node + + @mark_no_op + def leave_MatchSequence( + self, original_node: "MatchSequence", updated_node: "MatchSequence" + ) -> "MatchPattern": + return updated_node + + @mark_no_op + def leave_MatchSequenceElement( + self, + original_node: "MatchSequenceElement", + updated_node: "MatchSequenceElement", + ) -> Union[ + "MatchSequenceElement", FlattenSentinel["MatchSequenceElement"], RemovalSentinel + ]: + return updated_node + + @mark_no_op + def leave_MatchSingleton( + self, original_node: "MatchSingleton", updated_node: "MatchSingleton" + ) -> "MatchPattern": + return updated_node + + @mark_no_op + def leave_MatchStar( + self, original_node: "MatchStar", updated_node: "MatchStar" + ) -> "MatchStar": + return updated_node + + @mark_no_op + def leave_MatchTuple( + self, original_node: "MatchTuple", updated_node: "MatchTuple" + ) -> "MatchPattern": + return updated_node + + @mark_no_op + def leave_MatchValue( + self, original_node: "MatchValue", updated_node: "MatchValue" + ) -> "MatchPattern": + return updated_node + + @mark_no_op + def leave_MatrixMultiply( + self, original_node: "MatrixMultiply", updated_node: "MatrixMultiply" + ) -> "BaseBinaryOp": + return updated_node + + @mark_no_op + def leave_MatrixMultiplyAssign( + self, + original_node: "MatrixMultiplyAssign", + updated_node: "MatrixMultiplyAssign", + ) -> "BaseAugOp": + return updated_node + + @mark_no_op + def leave_Minus( + self, original_node: "Minus", updated_node: "Minus" + ) -> "BaseUnaryOp": + return updated_node + + @mark_no_op + def leave_Module(self, original_node: "Module", updated_node: "Module") -> "Module": + return updated_node + + @mark_no_op + def leave_Modulo( + self, original_node: "Modulo", updated_node: "Modulo" + ) -> "BaseBinaryOp": + return updated_node + + @mark_no_op + def leave_ModuloAssign( + self, original_node: "ModuloAssign", updated_node: "ModuloAssign" + ) -> "BaseAugOp": + return updated_node + + @mark_no_op + def leave_Multiply( + self, original_node: "Multiply", updated_node: "Multiply" + ) -> "BaseBinaryOp": + return updated_node + + @mark_no_op + def leave_MultiplyAssign( + self, original_node: "MultiplyAssign", updated_node: "MultiplyAssign" + ) -> "BaseAugOp": + return updated_node + + @mark_no_op + def leave_Name( + self, original_node: "Name", updated_node: "Name" + ) -> "BaseExpression": + return updated_node + + @mark_no_op + def leave_NameItem( + self, original_node: "NameItem", updated_node: "NameItem" + ) -> Union["NameItem", FlattenSentinel["NameItem"], RemovalSentinel]: + return updated_node + + @mark_no_op + def leave_NamedExpr( + self, original_node: "NamedExpr", updated_node: "NamedExpr" + ) -> "BaseExpression": + return updated_node + + @mark_no_op + def leave_Newline( + self, original_node: "Newline", updated_node: "Newline" + ) -> "Newline": + return updated_node + + @mark_no_op + def leave_Nonlocal( + self, original_node: "Nonlocal", updated_node: "Nonlocal" + ) -> Union[ + "BaseSmallStatement", FlattenSentinel["BaseSmallStatement"], RemovalSentinel + ]: + return updated_node + + @mark_no_op + def leave_Not(self, original_node: "Not", updated_node: "Not") -> "BaseUnaryOp": + return updated_node + + @mark_no_op + def leave_NotEqual( + self, original_node: "NotEqual", updated_node: "NotEqual" + ) -> "BaseCompOp": + return updated_node + + @mark_no_op + def leave_NotIn( + self, original_node: "NotIn", updated_node: "NotIn" + ) -> "BaseCompOp": + return updated_node + + @mark_no_op + def leave_Or(self, original_node: "Or", updated_node: "Or") -> "BaseBooleanOp": + return updated_node + + @mark_no_op + def leave_Param( + self, original_node: "Param", updated_node: "Param" + ) -> Union["Param", MaybeSentinel, FlattenSentinel["Param"], RemovalSentinel]: + return updated_node + + @mark_no_op + def leave_ParamSlash( + self, original_node: "ParamSlash", updated_node: "ParamSlash" + ) -> Union["ParamSlash", MaybeSentinel]: + return updated_node + + @mark_no_op + def leave_ParamSpec( + self, original_node: "ParamSpec", updated_node: "ParamSpec" + ) -> "ParamSpec": + return updated_node + + @mark_no_op + def leave_ParamStar( + self, original_node: "ParamStar", updated_node: "ParamStar" + ) -> Union["ParamStar", MaybeSentinel]: + return updated_node + + @mark_no_op + def leave_Parameters( + self, original_node: "Parameters", updated_node: "Parameters" + ) -> "Parameters": + return updated_node + + @mark_no_op + def leave_ParenthesizedWhitespace( + self, + original_node: "ParenthesizedWhitespace", + updated_node: "ParenthesizedWhitespace", + ) -> Union["BaseParenthesizableWhitespace", MaybeSentinel]: + return updated_node + + @mark_no_op + def leave_Pass( + self, original_node: "Pass", updated_node: "Pass" + ) -> Union[ + "BaseSmallStatement", FlattenSentinel["BaseSmallStatement"], RemovalSentinel + ]: + return updated_node + + @mark_no_op + def leave_Plus(self, original_node: "Plus", updated_node: "Plus") -> "BaseUnaryOp": + return updated_node + + @mark_no_op + def leave_Power( + self, original_node: "Power", updated_node: "Power" + ) -> "BaseBinaryOp": + return updated_node + + @mark_no_op + def leave_PowerAssign( + self, original_node: "PowerAssign", updated_node: "PowerAssign" + ) -> "BaseAugOp": + return updated_node + + @mark_no_op + def leave_Raise( + self, original_node: "Raise", updated_node: "Raise" + ) -> Union[ + "BaseSmallStatement", FlattenSentinel["BaseSmallStatement"], RemovalSentinel + ]: + return updated_node + + @mark_no_op + def leave_Return( + self, original_node: "Return", updated_node: "Return" + ) -> Union[ + "BaseSmallStatement", FlattenSentinel["BaseSmallStatement"], RemovalSentinel + ]: + return updated_node + + @mark_no_op + def leave_RightCurlyBrace( + self, original_node: "RightCurlyBrace", updated_node: "RightCurlyBrace" + ) -> "RightCurlyBrace": + return updated_node + + @mark_no_op + def leave_RightParen( + self, original_node: "RightParen", updated_node: "RightParen" + ) -> Union[ + "RightParen", MaybeSentinel, FlattenSentinel["RightParen"], RemovalSentinel + ]: + return updated_node + + @mark_no_op + def leave_RightShift( + self, original_node: "RightShift", updated_node: "RightShift" + ) -> "BaseBinaryOp": + return updated_node + + @mark_no_op + def leave_RightShiftAssign( + self, original_node: "RightShiftAssign", updated_node: "RightShiftAssign" + ) -> "BaseAugOp": + return updated_node + + @mark_no_op + def leave_RightSquareBracket( + self, original_node: "RightSquareBracket", updated_node: "RightSquareBracket" + ) -> "RightSquareBracket": + return updated_node + + @mark_no_op + def leave_Semicolon( + self, original_node: "Semicolon", updated_node: "Semicolon" + ) -> Union["Semicolon", MaybeSentinel]: + return updated_node + + @mark_no_op + def leave_Set(self, original_node: "Set", updated_node: "Set") -> "BaseExpression": + return updated_node + + @mark_no_op + def leave_SetComp( + self, original_node: "SetComp", updated_node: "SetComp" + ) -> "BaseExpression": + return updated_node + + @mark_no_op + def leave_SimpleStatementLine( + self, original_node: "SimpleStatementLine", updated_node: "SimpleStatementLine" + ) -> Union["BaseStatement", FlattenSentinel["BaseStatement"], RemovalSentinel]: + return updated_node + + @mark_no_op + def leave_SimpleStatementSuite( + self, + original_node: "SimpleStatementSuite", + updated_node: "SimpleStatementSuite", + ) -> "BaseSuite": + return updated_node + + @mark_no_op + def leave_SimpleString( + self, original_node: "SimpleString", updated_node: "SimpleString" + ) -> "BaseExpression": + return updated_node + + @mark_no_op + def leave_SimpleWhitespace( + self, original_node: "SimpleWhitespace", updated_node: "SimpleWhitespace" + ) -> Union["BaseParenthesizableWhitespace", MaybeSentinel]: + return updated_node + + @mark_no_op + def leave_Slice(self, original_node: "Slice", updated_node: "Slice") -> "BaseSlice": + return updated_node + + @mark_no_op + def leave_StarredDictElement( + self, original_node: "StarredDictElement", updated_node: "StarredDictElement" + ) -> Union["BaseDictElement", FlattenSentinel["BaseDictElement"], RemovalSentinel]: + return updated_node + + @mark_no_op + def leave_StarredElement( + self, original_node: "StarredElement", updated_node: "StarredElement" + ) -> "BaseExpression": + return updated_node + + @mark_no_op + def leave_Subscript( + self, original_node: "Subscript", updated_node: "Subscript" + ) -> "BaseExpression": + return updated_node + + @mark_no_op + def leave_SubscriptElement( + self, original_node: "SubscriptElement", updated_node: "SubscriptElement" + ) -> Union[ + "SubscriptElement", FlattenSentinel["SubscriptElement"], RemovalSentinel + ]: + return updated_node + + @mark_no_op + def leave_Subtract( + self, original_node: "Subtract", updated_node: "Subtract" + ) -> "BaseBinaryOp": + return updated_node + + @mark_no_op + def leave_SubtractAssign( + self, original_node: "SubtractAssign", updated_node: "SubtractAssign" + ) -> "BaseAugOp": + return updated_node + + @mark_no_op + def leave_TrailingWhitespace( + self, original_node: "TrailingWhitespace", updated_node: "TrailingWhitespace" + ) -> "TrailingWhitespace": + return updated_node + + @mark_no_op + def leave_Try( + self, original_node: "Try", updated_node: "Try" + ) -> Union["BaseStatement", FlattenSentinel["BaseStatement"], RemovalSentinel]: + return updated_node + + @mark_no_op + def leave_TryStar( + self, original_node: "TryStar", updated_node: "TryStar" + ) -> Union["BaseStatement", FlattenSentinel["BaseStatement"], RemovalSentinel]: + return updated_node + + @mark_no_op + def leave_Tuple( + self, original_node: "Tuple", updated_node: "Tuple" + ) -> "BaseExpression": + return updated_node + + @mark_no_op + def leave_TypeAlias( + self, original_node: "TypeAlias", updated_node: "TypeAlias" + ) -> Union[ + "BaseSmallStatement", FlattenSentinel["BaseSmallStatement"], RemovalSentinel + ]: + return updated_node + + @mark_no_op + def leave_TypeParam( + self, original_node: "TypeParam", updated_node: "TypeParam" + ) -> Union["TypeParam", FlattenSentinel["TypeParam"], RemovalSentinel]: + return updated_node + + @mark_no_op + def leave_TypeParameters( + self, original_node: "TypeParameters", updated_node: "TypeParameters" + ) -> "TypeParameters": + return updated_node + + @mark_no_op + def leave_TypeVar( + self, original_node: "TypeVar", updated_node: "TypeVar" + ) -> "TypeVar": + return updated_node + + @mark_no_op + def leave_TypeVarTuple( + self, original_node: "TypeVarTuple", updated_node: "TypeVarTuple" + ) -> "TypeVarTuple": + return updated_node + + @mark_no_op + def leave_UnaryOperation( + self, original_node: "UnaryOperation", updated_node: "UnaryOperation" + ) -> "BaseExpression": + return updated_node + + @mark_no_op + def leave_While( + self, original_node: "While", updated_node: "While" + ) -> Union["BaseStatement", FlattenSentinel["BaseStatement"], RemovalSentinel]: + return updated_node + + @mark_no_op + def leave_With( + self, original_node: "With", updated_node: "With" + ) -> Union["BaseStatement", FlattenSentinel["BaseStatement"], RemovalSentinel]: + return updated_node + + @mark_no_op + def leave_WithItem( + self, original_node: "WithItem", updated_node: "WithItem" + ) -> Union["WithItem", FlattenSentinel["WithItem"], RemovalSentinel]: + return updated_node + + @mark_no_op + def leave_Yield( + self, original_node: "Yield", updated_node: "Yield" + ) -> "BaseExpression": + return updated_node diff --git a/libcst/matchers/__init__.py b/libcst/matchers/__init__.py index ed40d70a8..710368764 100644 --- a/libcst/matchers/__init__.py +++ b/libcst/matchers/__init__.py @@ -1,16260 +1,16260 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under the MIT license found in the -# LICENSE file in the root directory of this source tree. - - -# This file was generated by libcst.codegen.gen_matcher_classes -from dataclasses import dataclass -from typing import Optional, Sequence, Union - -from typing_extensions import Literal - -import libcst as cst -from libcst.matchers._decorators import call_if_inside, call_if_not_inside, leave, visit -from libcst.matchers._matcher_base import ( - AbstractBaseMatcherNodeMeta, - AllOf, - AtLeastN, - AtMostN, - BaseMatcherNode, - DoesNotMatch, - DoNotCare, - DoNotCareSentinel, - extract, - extractall, - findall, - matches, - MatchIfTrue, - MatchMetadata, - MatchMetadataIfTrue, - MatchRegex, - OneOf, - replace, - SaveMatchedNode, - TypeOf, - ZeroOrMore, - ZeroOrOne, -) -from libcst.matchers._visitors import ( - MatchDecoratorMismatch, - MatcherDecoratableTransformer, - MatcherDecoratableVisitor, -) - - -class _NodeABC(metaclass=AbstractBaseMatcherNodeMeta): - __slots__ = () - - -class BaseAssignTargetExpression(_NodeABC): - pass - - -class BaseAugOp(_NodeABC): - pass - - -class BaseBinaryOp(_NodeABC): - pass - - -class BaseBooleanOp(_NodeABC): - pass - - -class BaseComp(_NodeABC): - pass - - -class BaseCompOp(_NodeABC): - pass - - -class BaseCompoundStatement(_NodeABC): - pass - - -class BaseDelTargetExpression(_NodeABC): - pass - - -class BaseDict(_NodeABC): - pass - - -class BaseDictElement(_NodeABC): - pass - - -class BaseElement(_NodeABC): - pass - - -class BaseExpression(_NodeABC): - pass - - -class BaseFormattedStringContent(_NodeABC): - pass - - -class BaseList(_NodeABC): - pass - - -class BaseMetadataProvider(_NodeABC): - pass - - -class BaseNumber(_NodeABC): - pass - - -class BaseParenthesizableWhitespace(_NodeABC): - pass - - -class BaseSet(_NodeABC): - pass - - -class BaseSimpleComp(_NodeABC): - pass - - -class BaseSlice(_NodeABC): - pass - - -class BaseSmallStatement(_NodeABC): - pass - - -class BaseStatement(_NodeABC): - pass - - -class BaseString(_NodeABC): - pass - - -class BaseSuite(_NodeABC): - pass - - -class BaseUnaryOp(_NodeABC): - pass - - -MetadataMatchType = Union[MatchMetadata, MatchMetadataIfTrue] - - -BaseParenthesizableWhitespaceMatchType = Union[ - "BaseParenthesizableWhitespace", - MetadataMatchType, - MatchIfTrue[cst.BaseParenthesizableWhitespace], -] - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class Add(BaseBinaryOp, BaseMatcherNode): - whitespace_before: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - whitespace_after: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class AddAssign(BaseAugOp, BaseMatcherNode): - whitespace_before: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - whitespace_after: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class And(BaseBooleanOp, BaseMatcherNode): - whitespace_before: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - whitespace_after: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -BaseAssignTargetExpressionMatchType = Union[ - "BaseAssignTargetExpression", - MetadataMatchType, - MatchIfTrue[cst.BaseAssignTargetExpression], -] -AnnotationMatchType = Union[ - "Annotation", MetadataMatchType, MatchIfTrue[cst.Annotation] -] -AssignEqualMatchType = Union[ - "AssignEqual", MetadataMatchType, MatchIfTrue[cst.AssignEqual] -] -SemicolonMatchType = Union["Semicolon", MetadataMatchType, MatchIfTrue[cst.Semicolon]] - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class AnnAssign(BaseSmallStatement, BaseMatcherNode): - target: Union[ - BaseAssignTargetExpressionMatchType, - DoNotCareSentinel, - OneOf[BaseAssignTargetExpressionMatchType], - AllOf[BaseAssignTargetExpressionMatchType], - ] = DoNotCare() - annotation: Union[ - AnnotationMatchType, - DoNotCareSentinel, - OneOf[AnnotationMatchType], - AllOf[AnnotationMatchType], - ] = DoNotCare() - value: Union[ - Optional["BaseExpression"], - MetadataMatchType, - MatchIfTrue[Optional[cst.BaseExpression]], - DoNotCareSentinel, - OneOf[ - Union[ - Optional["BaseExpression"], - MetadataMatchType, - MatchIfTrue[Optional[cst.BaseExpression]], - ] - ], - AllOf[ - Union[ - Optional["BaseExpression"], - MetadataMatchType, - MatchIfTrue[Optional[cst.BaseExpression]], - ] - ], - ] = DoNotCare() - equal: Union[ - AssignEqualMatchType, - DoNotCareSentinel, - OneOf[AssignEqualMatchType], - AllOf[AssignEqualMatchType], - ] = DoNotCare() - semicolon: Union[ - SemicolonMatchType, - DoNotCareSentinel, - OneOf[SemicolonMatchType], - AllOf[SemicolonMatchType], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -BaseExpressionMatchType = Union[ - "BaseExpression", MetadataMatchType, MatchIfTrue[cst.BaseExpression] -] - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class Annotation(BaseMatcherNode): - annotation: Union[ - BaseExpressionMatchType, - DoNotCareSentinel, - OneOf[BaseExpressionMatchType], - AllOf[BaseExpressionMatchType], - ] = DoNotCare() - whitespace_before_indicator: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - whitespace_after_indicator: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -CommaMatchType = Union["Comma", MetadataMatchType, MatchIfTrue[cst.Comma]] - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class Arg(BaseMatcherNode): - value: Union[ - BaseExpressionMatchType, - DoNotCareSentinel, - OneOf[BaseExpressionMatchType], - AllOf[BaseExpressionMatchType], - ] = DoNotCare() - keyword: Union[ - Optional["Name"], - MetadataMatchType, - MatchIfTrue[Optional[cst.Name]], - DoNotCareSentinel, - OneOf[ - Union[Optional["Name"], MetadataMatchType, MatchIfTrue[Optional[cst.Name]]] - ], - AllOf[ - Union[Optional["Name"], MetadataMatchType, MatchIfTrue[Optional[cst.Name]]] - ], - ] = DoNotCare() - equal: Union[ - AssignEqualMatchType, - DoNotCareSentinel, - OneOf[AssignEqualMatchType], - AllOf[AssignEqualMatchType], - ] = DoNotCare() - comma: Union[ - CommaMatchType, DoNotCareSentinel, OneOf[CommaMatchType], AllOf[CommaMatchType] - ] = DoNotCare() - star: Union[ - Literal["", "*", "**"], - MetadataMatchType, - MatchIfTrue[Literal["", "*", "**"]], - DoNotCareSentinel, - OneOf[ - Union[ - Literal["", "*", "**"], - MetadataMatchType, - MatchIfTrue[Literal["", "*", "**"]], - ] - ], - AllOf[ - Union[ - Literal["", "*", "**"], - MetadataMatchType, - MatchIfTrue[Literal["", "*", "**"]], - ] - ], - ] = DoNotCare() - whitespace_after_star: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - whitespace_after_arg: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -NameOrTupleOrListMatchType = Union[ - "Name", - "Tuple", - "List", - MetadataMatchType, - MatchIfTrue[Union[cst.Name, cst.Tuple, cst.List]], -] - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class AsName(BaseMatcherNode): - name: Union[ - NameOrTupleOrListMatchType, - DoNotCareSentinel, - OneOf[NameOrTupleOrListMatchType], - AllOf[NameOrTupleOrListMatchType], - ] = DoNotCare() - whitespace_before_as: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - whitespace_after_as: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -SimpleWhitespaceMatchType = Union[ - "SimpleWhitespace", MetadataMatchType, MatchIfTrue[cst.SimpleWhitespace] -] - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class Assert(BaseSmallStatement, BaseMatcherNode): - test: Union[ - BaseExpressionMatchType, - DoNotCareSentinel, - OneOf[BaseExpressionMatchType], - AllOf[BaseExpressionMatchType], - ] = DoNotCare() - msg: Union[ - Optional["BaseExpression"], - MetadataMatchType, - MatchIfTrue[Optional[cst.BaseExpression]], - DoNotCareSentinel, - OneOf[ - Union[ - Optional["BaseExpression"], - MetadataMatchType, - MatchIfTrue[Optional[cst.BaseExpression]], - ] - ], - AllOf[ - Union[ - Optional["BaseExpression"], - MetadataMatchType, - MatchIfTrue[Optional[cst.BaseExpression]], - ] - ], - ] = DoNotCare() - comma: Union[ - CommaMatchType, DoNotCareSentinel, OneOf[CommaMatchType], AllOf[CommaMatchType] - ] = DoNotCare() - whitespace_after_assert: Union[ - SimpleWhitespaceMatchType, - DoNotCareSentinel, - OneOf[SimpleWhitespaceMatchType], - AllOf[SimpleWhitespaceMatchType], - ] = DoNotCare() - semicolon: Union[ - SemicolonMatchType, - DoNotCareSentinel, - OneOf[SemicolonMatchType], - AllOf[SemicolonMatchType], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -AssignTargetMatchType = Union[ - "AssignTarget", MetadataMatchType, MatchIfTrue[cst.AssignTarget] -] - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class Assign(BaseSmallStatement, BaseMatcherNode): - targets: Union[ - Sequence[ - Union[ - AssignTargetMatchType, - DoNotCareSentinel, - OneOf[AssignTargetMatchType], - AllOf[AssignTargetMatchType], - AtLeastN[ - Union[ - AssignTargetMatchType, - DoNotCareSentinel, - OneOf[AssignTargetMatchType], - AllOf[AssignTargetMatchType], - ] - ], - AtMostN[ - Union[ - AssignTargetMatchType, - DoNotCareSentinel, - OneOf[AssignTargetMatchType], - AllOf[AssignTargetMatchType], - ] - ], - ] - ], - DoNotCareSentinel, - MatchIfTrue[Sequence[cst.AssignTarget]], - OneOf[ - Union[ - Sequence[ - Union[ - AssignTargetMatchType, - OneOf[AssignTargetMatchType], - AllOf[AssignTargetMatchType], - AtLeastN[ - Union[ - AssignTargetMatchType, - OneOf[AssignTargetMatchType], - AllOf[AssignTargetMatchType], - ] - ], - AtMostN[ - Union[ - AssignTargetMatchType, - OneOf[AssignTargetMatchType], - AllOf[AssignTargetMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.AssignTarget]], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - AssignTargetMatchType, - OneOf[AssignTargetMatchType], - AllOf[AssignTargetMatchType], - AtLeastN[ - Union[ - AssignTargetMatchType, - OneOf[AssignTargetMatchType], - AllOf[AssignTargetMatchType], - ] - ], - AtMostN[ - Union[ - AssignTargetMatchType, - OneOf[AssignTargetMatchType], - AllOf[AssignTargetMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.AssignTarget]], - ] - ], - ] = DoNotCare() - value: Union[ - BaseExpressionMatchType, - DoNotCareSentinel, - OneOf[BaseExpressionMatchType], - AllOf[BaseExpressionMatchType], - ] = DoNotCare() - semicolon: Union[ - SemicolonMatchType, - DoNotCareSentinel, - OneOf[SemicolonMatchType], - AllOf[SemicolonMatchType], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class AssignEqual(BaseMatcherNode): - whitespace_before: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - whitespace_after: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class AssignTarget(BaseMatcherNode): - target: Union[ - BaseAssignTargetExpressionMatchType, - DoNotCareSentinel, - OneOf[BaseAssignTargetExpressionMatchType], - AllOf[BaseAssignTargetExpressionMatchType], - ] = DoNotCare() - whitespace_before_equal: Union[ - SimpleWhitespaceMatchType, - DoNotCareSentinel, - OneOf[SimpleWhitespaceMatchType], - AllOf[SimpleWhitespaceMatchType], - ] = DoNotCare() - whitespace_after_equal: Union[ - SimpleWhitespaceMatchType, - DoNotCareSentinel, - OneOf[SimpleWhitespaceMatchType], - AllOf[SimpleWhitespaceMatchType], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class Asynchronous(BaseMatcherNode): - whitespace_after: Union[ - SimpleWhitespaceMatchType, - DoNotCareSentinel, - OneOf[SimpleWhitespaceMatchType], - AllOf[SimpleWhitespaceMatchType], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -NameMatchType = Union["Name", MetadataMatchType, MatchIfTrue[cst.Name]] -DotMatchType = Union["Dot", MetadataMatchType, MatchIfTrue[cst.Dot]] -LeftParenMatchType = Union["LeftParen", MetadataMatchType, MatchIfTrue[cst.LeftParen]] -RightParenMatchType = Union[ - "RightParen", MetadataMatchType, MatchIfTrue[cst.RightParen] -] - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class Attribute( - BaseAssignTargetExpression, BaseDelTargetExpression, BaseExpression, BaseMatcherNode -): - value: Union[ - BaseExpressionMatchType, - DoNotCareSentinel, - OneOf[BaseExpressionMatchType], - AllOf[BaseExpressionMatchType], - ] = DoNotCare() - attr: Union[ - NameMatchType, DoNotCareSentinel, OneOf[NameMatchType], AllOf[NameMatchType] - ] = DoNotCare() - dot: Union[ - DotMatchType, DoNotCareSentinel, OneOf[DotMatchType], AllOf[DotMatchType] - ] = DoNotCare() - lpar: Union[ - Sequence[ - Union[ - LeftParenMatchType, - DoNotCareSentinel, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - AtLeastN[ - Union[ - LeftParenMatchType, - DoNotCareSentinel, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - AtMostN[ - Union[ - LeftParenMatchType, - DoNotCareSentinel, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - ] - ], - DoNotCareSentinel, - MatchIfTrue[Sequence[cst.LeftParen]], - OneOf[ - Union[ - Sequence[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - AtLeastN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - AtMostN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.LeftParen]], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - AtLeastN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - AtMostN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.LeftParen]], - ] - ], - ] = DoNotCare() - rpar: Union[ - Sequence[ - Union[ - RightParenMatchType, - DoNotCareSentinel, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - AtLeastN[ - Union[ - RightParenMatchType, - DoNotCareSentinel, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - AtMostN[ - Union[ - RightParenMatchType, - DoNotCareSentinel, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - ] - ], - DoNotCareSentinel, - MatchIfTrue[Sequence[cst.RightParen]], - OneOf[ - Union[ - Sequence[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - AtLeastN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - AtMostN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.RightParen]], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - AtLeastN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - AtMostN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.RightParen]], - ] - ], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -BaseAugOpMatchType = Union["BaseAugOp", MetadataMatchType, MatchIfTrue[cst.BaseAugOp]] - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class AugAssign(BaseSmallStatement, BaseMatcherNode): - target: Union[ - BaseAssignTargetExpressionMatchType, - DoNotCareSentinel, - OneOf[BaseAssignTargetExpressionMatchType], - AllOf[BaseAssignTargetExpressionMatchType], - ] = DoNotCare() - operator: Union[ - BaseAugOpMatchType, - DoNotCareSentinel, - OneOf[BaseAugOpMatchType], - AllOf[BaseAugOpMatchType], - ] = DoNotCare() - value: Union[ - BaseExpressionMatchType, - DoNotCareSentinel, - OneOf[BaseExpressionMatchType], - AllOf[BaseExpressionMatchType], - ] = DoNotCare() - semicolon: Union[ - SemicolonMatchType, - DoNotCareSentinel, - OneOf[SemicolonMatchType], - AllOf[SemicolonMatchType], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class Await(BaseExpression, BaseMatcherNode): - expression: Union[ - BaseExpressionMatchType, - DoNotCareSentinel, - OneOf[BaseExpressionMatchType], - AllOf[BaseExpressionMatchType], - ] = DoNotCare() - lpar: Union[ - Sequence[ - Union[ - LeftParenMatchType, - DoNotCareSentinel, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - AtLeastN[ - Union[ - LeftParenMatchType, - DoNotCareSentinel, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - AtMostN[ - Union[ - LeftParenMatchType, - DoNotCareSentinel, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - ] - ], - DoNotCareSentinel, - MatchIfTrue[Sequence[cst.LeftParen]], - OneOf[ - Union[ - Sequence[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - AtLeastN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - AtMostN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.LeftParen]], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - AtLeastN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - AtMostN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.LeftParen]], - ] - ], - ] = DoNotCare() - rpar: Union[ - Sequence[ - Union[ - RightParenMatchType, - DoNotCareSentinel, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - AtLeastN[ - Union[ - RightParenMatchType, - DoNotCareSentinel, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - AtMostN[ - Union[ - RightParenMatchType, - DoNotCareSentinel, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - ] - ], - DoNotCareSentinel, - MatchIfTrue[Sequence[cst.RightParen]], - OneOf[ - Union[ - Sequence[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - AtLeastN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - AtMostN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.RightParen]], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - AtLeastN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - AtMostN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.RightParen]], - ] - ], - ] = DoNotCare() - whitespace_after_await: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -BaseBinaryOpMatchType = Union[ - "BaseBinaryOp", MetadataMatchType, MatchIfTrue[cst.BaseBinaryOp] -] - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class BinaryOperation(BaseExpression, BaseMatcherNode): - left: Union[ - BaseExpressionMatchType, - DoNotCareSentinel, - OneOf[BaseExpressionMatchType], - AllOf[BaseExpressionMatchType], - ] = DoNotCare() - operator: Union[ - BaseBinaryOpMatchType, - DoNotCareSentinel, - OneOf[BaseBinaryOpMatchType], - AllOf[BaseBinaryOpMatchType], - ] = DoNotCare() - right: Union[ - BaseExpressionMatchType, - DoNotCareSentinel, - OneOf[BaseExpressionMatchType], - AllOf[BaseExpressionMatchType], - ] = DoNotCare() - lpar: Union[ - Sequence[ - Union[ - LeftParenMatchType, - DoNotCareSentinel, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - AtLeastN[ - Union[ - LeftParenMatchType, - DoNotCareSentinel, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - AtMostN[ - Union[ - LeftParenMatchType, - DoNotCareSentinel, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - ] - ], - DoNotCareSentinel, - MatchIfTrue[Sequence[cst.LeftParen]], - OneOf[ - Union[ - Sequence[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - AtLeastN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - AtMostN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.LeftParen]], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - AtLeastN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - AtMostN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.LeftParen]], - ] - ], - ] = DoNotCare() - rpar: Union[ - Sequence[ - Union[ - RightParenMatchType, - DoNotCareSentinel, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - AtLeastN[ - Union[ - RightParenMatchType, - DoNotCareSentinel, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - AtMostN[ - Union[ - RightParenMatchType, - DoNotCareSentinel, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - ] - ], - DoNotCareSentinel, - MatchIfTrue[Sequence[cst.RightParen]], - OneOf[ - Union[ - Sequence[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - AtLeastN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - AtMostN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.RightParen]], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - AtLeastN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - AtMostN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.RightParen]], - ] - ], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class BitAnd(BaseBinaryOp, BaseMatcherNode): - whitespace_before: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - whitespace_after: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class BitAndAssign(BaseAugOp, BaseMatcherNode): - whitespace_before: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - whitespace_after: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class BitInvert(BaseUnaryOp, BaseMatcherNode): - whitespace_after: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class BitOr(BaseBinaryOp, BaseMatcherNode): - whitespace_before: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - whitespace_after: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class BitOrAssign(BaseAugOp, BaseMatcherNode): - whitespace_before: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - whitespace_after: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class BitXor(BaseBinaryOp, BaseMatcherNode): - whitespace_before: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - whitespace_after: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class BitXorAssign(BaseAugOp, BaseMatcherNode): - whitespace_before: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - whitespace_after: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -BaseBooleanOpMatchType = Union[ - "BaseBooleanOp", MetadataMatchType, MatchIfTrue[cst.BaseBooleanOp] -] - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class BooleanOperation(BaseExpression, BaseMatcherNode): - left: Union[ - BaseExpressionMatchType, - DoNotCareSentinel, - OneOf[BaseExpressionMatchType], - AllOf[BaseExpressionMatchType], - ] = DoNotCare() - operator: Union[ - BaseBooleanOpMatchType, - DoNotCareSentinel, - OneOf[BaseBooleanOpMatchType], - AllOf[BaseBooleanOpMatchType], - ] = DoNotCare() - right: Union[ - BaseExpressionMatchType, - DoNotCareSentinel, - OneOf[BaseExpressionMatchType], - AllOf[BaseExpressionMatchType], - ] = DoNotCare() - lpar: Union[ - Sequence[ - Union[ - LeftParenMatchType, - DoNotCareSentinel, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - AtLeastN[ - Union[ - LeftParenMatchType, - DoNotCareSentinel, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - AtMostN[ - Union[ - LeftParenMatchType, - DoNotCareSentinel, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - ] - ], - DoNotCareSentinel, - MatchIfTrue[Sequence[cst.LeftParen]], - OneOf[ - Union[ - Sequence[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - AtLeastN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - AtMostN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.LeftParen]], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - AtLeastN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - AtMostN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.LeftParen]], - ] - ], - ] = DoNotCare() - rpar: Union[ - Sequence[ - Union[ - RightParenMatchType, - DoNotCareSentinel, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - AtLeastN[ - Union[ - RightParenMatchType, - DoNotCareSentinel, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - AtMostN[ - Union[ - RightParenMatchType, - DoNotCareSentinel, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - ] - ], - DoNotCareSentinel, - MatchIfTrue[Sequence[cst.RightParen]], - OneOf[ - Union[ - Sequence[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - AtLeastN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - AtMostN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.RightParen]], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - AtLeastN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - AtMostN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.RightParen]], - ] - ], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class Break(BaseSmallStatement, BaseMatcherNode): - semicolon: Union[ - SemicolonMatchType, - DoNotCareSentinel, - OneOf[SemicolonMatchType], - AllOf[SemicolonMatchType], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -ArgMatchType = Union["Arg", MetadataMatchType, MatchIfTrue[cst.Arg]] - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class Call(BaseExpression, BaseMatcherNode): - func: Union[ - BaseExpressionMatchType, - DoNotCareSentinel, - OneOf[BaseExpressionMatchType], - AllOf[BaseExpressionMatchType], - ] = DoNotCare() - args: Union[ - Sequence[ - Union[ - ArgMatchType, - DoNotCareSentinel, - OneOf[ArgMatchType], - AllOf[ArgMatchType], - AtLeastN[ - Union[ - ArgMatchType, - DoNotCareSentinel, - OneOf[ArgMatchType], - AllOf[ArgMatchType], - ] - ], - AtMostN[ - Union[ - ArgMatchType, - DoNotCareSentinel, - OneOf[ArgMatchType], - AllOf[ArgMatchType], - ] - ], - ] - ], - DoNotCareSentinel, - MatchIfTrue[Sequence[cst.Arg]], - OneOf[ - Union[ - Sequence[ - Union[ - ArgMatchType, - OneOf[ArgMatchType], - AllOf[ArgMatchType], - AtLeastN[ - Union[ - ArgMatchType, OneOf[ArgMatchType], AllOf[ArgMatchType] - ] - ], - AtMostN[ - Union[ - ArgMatchType, OneOf[ArgMatchType], AllOf[ArgMatchType] - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.Arg]], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - ArgMatchType, - OneOf[ArgMatchType], - AllOf[ArgMatchType], - AtLeastN[ - Union[ - ArgMatchType, OneOf[ArgMatchType], AllOf[ArgMatchType] - ] - ], - AtMostN[ - Union[ - ArgMatchType, OneOf[ArgMatchType], AllOf[ArgMatchType] - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.Arg]], - ] - ], - ] = DoNotCare() - lpar: Union[ - Sequence[ - Union[ - LeftParenMatchType, - DoNotCareSentinel, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - AtLeastN[ - Union[ - LeftParenMatchType, - DoNotCareSentinel, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - AtMostN[ - Union[ - LeftParenMatchType, - DoNotCareSentinel, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - ] - ], - DoNotCareSentinel, - MatchIfTrue[Sequence[cst.LeftParen]], - OneOf[ - Union[ - Sequence[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - AtLeastN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - AtMostN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.LeftParen]], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - AtLeastN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - AtMostN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.LeftParen]], - ] - ], - ] = DoNotCare() - rpar: Union[ - Sequence[ - Union[ - RightParenMatchType, - DoNotCareSentinel, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - AtLeastN[ - Union[ - RightParenMatchType, - DoNotCareSentinel, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - AtMostN[ - Union[ - RightParenMatchType, - DoNotCareSentinel, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - ] - ], - DoNotCareSentinel, - MatchIfTrue[Sequence[cst.RightParen]], - OneOf[ - Union[ - Sequence[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - AtLeastN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - AtMostN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.RightParen]], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - AtLeastN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - AtMostN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.RightParen]], - ] - ], - ] = DoNotCare() - whitespace_after_func: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - whitespace_before_args: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -BaseSuiteMatchType = Union["BaseSuite", MetadataMatchType, MatchIfTrue[cst.BaseSuite]] -DecoratorMatchType = Union["Decorator", MetadataMatchType, MatchIfTrue[cst.Decorator]] -EmptyLineMatchType = Union["EmptyLine", MetadataMatchType, MatchIfTrue[cst.EmptyLine]] - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class ClassDef(BaseCompoundStatement, BaseStatement, BaseMatcherNode): - name: Union[ - NameMatchType, DoNotCareSentinel, OneOf[NameMatchType], AllOf[NameMatchType] - ] = DoNotCare() - body: Union[ - BaseSuiteMatchType, - DoNotCareSentinel, - OneOf[BaseSuiteMatchType], - AllOf[BaseSuiteMatchType], - ] = DoNotCare() - bases: Union[ - Sequence[ - Union[ - ArgMatchType, - DoNotCareSentinel, - OneOf[ArgMatchType], - AllOf[ArgMatchType], - AtLeastN[ - Union[ - ArgMatchType, - DoNotCareSentinel, - OneOf[ArgMatchType], - AllOf[ArgMatchType], - ] - ], - AtMostN[ - Union[ - ArgMatchType, - DoNotCareSentinel, - OneOf[ArgMatchType], - AllOf[ArgMatchType], - ] - ], - ] - ], - DoNotCareSentinel, - MatchIfTrue[Sequence[cst.Arg]], - OneOf[ - Union[ - Sequence[ - Union[ - ArgMatchType, - OneOf[ArgMatchType], - AllOf[ArgMatchType], - AtLeastN[ - Union[ - ArgMatchType, OneOf[ArgMatchType], AllOf[ArgMatchType] - ] - ], - AtMostN[ - Union[ - ArgMatchType, OneOf[ArgMatchType], AllOf[ArgMatchType] - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.Arg]], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - ArgMatchType, - OneOf[ArgMatchType], - AllOf[ArgMatchType], - AtLeastN[ - Union[ - ArgMatchType, OneOf[ArgMatchType], AllOf[ArgMatchType] - ] - ], - AtMostN[ - Union[ - ArgMatchType, OneOf[ArgMatchType], AllOf[ArgMatchType] - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.Arg]], - ] - ], - ] = DoNotCare() - keywords: Union[ - Sequence[ - Union[ - ArgMatchType, - DoNotCareSentinel, - OneOf[ArgMatchType], - AllOf[ArgMatchType], - AtLeastN[ - Union[ - ArgMatchType, - DoNotCareSentinel, - OneOf[ArgMatchType], - AllOf[ArgMatchType], - ] - ], - AtMostN[ - Union[ - ArgMatchType, - DoNotCareSentinel, - OneOf[ArgMatchType], - AllOf[ArgMatchType], - ] - ], - ] - ], - DoNotCareSentinel, - MatchIfTrue[Sequence[cst.Arg]], - OneOf[ - Union[ - Sequence[ - Union[ - ArgMatchType, - OneOf[ArgMatchType], - AllOf[ArgMatchType], - AtLeastN[ - Union[ - ArgMatchType, OneOf[ArgMatchType], AllOf[ArgMatchType] - ] - ], - AtMostN[ - Union[ - ArgMatchType, OneOf[ArgMatchType], AllOf[ArgMatchType] - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.Arg]], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - ArgMatchType, - OneOf[ArgMatchType], - AllOf[ArgMatchType], - AtLeastN[ - Union[ - ArgMatchType, OneOf[ArgMatchType], AllOf[ArgMatchType] - ] - ], - AtMostN[ - Union[ - ArgMatchType, OneOf[ArgMatchType], AllOf[ArgMatchType] - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.Arg]], - ] - ], - ] = DoNotCare() - decorators: Union[ - Sequence[ - Union[ - DecoratorMatchType, - DoNotCareSentinel, - OneOf[DecoratorMatchType], - AllOf[DecoratorMatchType], - AtLeastN[ - Union[ - DecoratorMatchType, - DoNotCareSentinel, - OneOf[DecoratorMatchType], - AllOf[DecoratorMatchType], - ] - ], - AtMostN[ - Union[ - DecoratorMatchType, - DoNotCareSentinel, - OneOf[DecoratorMatchType], - AllOf[DecoratorMatchType], - ] - ], - ] - ], - DoNotCareSentinel, - MatchIfTrue[Sequence[cst.Decorator]], - OneOf[ - Union[ - Sequence[ - Union[ - DecoratorMatchType, - OneOf[DecoratorMatchType], - AllOf[DecoratorMatchType], - AtLeastN[ - Union[ - DecoratorMatchType, - OneOf[DecoratorMatchType], - AllOf[DecoratorMatchType], - ] - ], - AtMostN[ - Union[ - DecoratorMatchType, - OneOf[DecoratorMatchType], - AllOf[DecoratorMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.Decorator]], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - DecoratorMatchType, - OneOf[DecoratorMatchType], - AllOf[DecoratorMatchType], - AtLeastN[ - Union[ - DecoratorMatchType, - OneOf[DecoratorMatchType], - AllOf[DecoratorMatchType], - ] - ], - AtMostN[ - Union[ - DecoratorMatchType, - OneOf[DecoratorMatchType], - AllOf[DecoratorMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.Decorator]], - ] - ], - ] = DoNotCare() - lpar: Union[ - LeftParenMatchType, - DoNotCareSentinel, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] = DoNotCare() - rpar: Union[ - RightParenMatchType, - DoNotCareSentinel, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] = DoNotCare() - leading_lines: Union[ - Sequence[ - Union[ - EmptyLineMatchType, - DoNotCareSentinel, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - AtLeastN[ - Union[ - EmptyLineMatchType, - DoNotCareSentinel, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - AtMostN[ - Union[ - EmptyLineMatchType, - DoNotCareSentinel, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - ] - ], - DoNotCareSentinel, - MatchIfTrue[Sequence[cst.EmptyLine]], - OneOf[ - Union[ - Sequence[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - AtLeastN[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - AtMostN[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.EmptyLine]], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - AtLeastN[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - AtMostN[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.EmptyLine]], - ] - ], - ] = DoNotCare() - lines_after_decorators: Union[ - Sequence[ - Union[ - EmptyLineMatchType, - DoNotCareSentinel, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - AtLeastN[ - Union[ - EmptyLineMatchType, - DoNotCareSentinel, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - AtMostN[ - Union[ - EmptyLineMatchType, - DoNotCareSentinel, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - ] - ], - DoNotCareSentinel, - MatchIfTrue[Sequence[cst.EmptyLine]], - OneOf[ - Union[ - Sequence[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - AtLeastN[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - AtMostN[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.EmptyLine]], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - AtLeastN[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - AtMostN[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.EmptyLine]], - ] - ], - ] = DoNotCare() - whitespace_after_class: Union[ - SimpleWhitespaceMatchType, - DoNotCareSentinel, - OneOf[SimpleWhitespaceMatchType], - AllOf[SimpleWhitespaceMatchType], - ] = DoNotCare() - whitespace_after_name: Union[ - SimpleWhitespaceMatchType, - DoNotCareSentinel, - OneOf[SimpleWhitespaceMatchType], - AllOf[SimpleWhitespaceMatchType], - ] = DoNotCare() - whitespace_before_colon: Union[ - SimpleWhitespaceMatchType, - DoNotCareSentinel, - OneOf[SimpleWhitespaceMatchType], - AllOf[SimpleWhitespaceMatchType], - ] = DoNotCare() - type_parameters: Union[ - Optional["TypeParameters"], - MetadataMatchType, - MatchIfTrue[Optional[cst.TypeParameters]], - DoNotCareSentinel, - OneOf[ - Union[ - Optional["TypeParameters"], - MetadataMatchType, - MatchIfTrue[Optional[cst.TypeParameters]], - ] - ], - AllOf[ - Union[ - Optional["TypeParameters"], - MetadataMatchType, - MatchIfTrue[Optional[cst.TypeParameters]], - ] - ], - ] = DoNotCare() - whitespace_after_type_parameters: Union[ - SimpleWhitespaceMatchType, - DoNotCareSentinel, - OneOf[SimpleWhitespaceMatchType], - AllOf[SimpleWhitespaceMatchType], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class Colon(BaseMatcherNode): - whitespace_before: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - whitespace_after: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class Comma(BaseMatcherNode): - whitespace_before: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - whitespace_after: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -strMatchType = Union[str, MetadataMatchType, MatchIfTrue[str]] - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class Comment(BaseMatcherNode): - value: Union[ - strMatchType, DoNotCareSentinel, OneOf[strMatchType], AllOf[strMatchType] - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -CompIfMatchType = Union["CompIf", MetadataMatchType, MatchIfTrue[cst.CompIf]] - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class CompFor(BaseMatcherNode): - target: Union[ - BaseAssignTargetExpressionMatchType, - DoNotCareSentinel, - OneOf[BaseAssignTargetExpressionMatchType], - AllOf[BaseAssignTargetExpressionMatchType], - ] = DoNotCare() - iter: Union[ - BaseExpressionMatchType, - DoNotCareSentinel, - OneOf[BaseExpressionMatchType], - AllOf[BaseExpressionMatchType], - ] = DoNotCare() - ifs: Union[ - Sequence[ - Union[ - CompIfMatchType, - DoNotCareSentinel, - OneOf[CompIfMatchType], - AllOf[CompIfMatchType], - AtLeastN[ - Union[ - CompIfMatchType, - DoNotCareSentinel, - OneOf[CompIfMatchType], - AllOf[CompIfMatchType], - ] - ], - AtMostN[ - Union[ - CompIfMatchType, - DoNotCareSentinel, - OneOf[CompIfMatchType], - AllOf[CompIfMatchType], - ] - ], - ] - ], - DoNotCareSentinel, - MatchIfTrue[Sequence[cst.CompIf]], - OneOf[ - Union[ - Sequence[ - Union[ - CompIfMatchType, - OneOf[CompIfMatchType], - AllOf[CompIfMatchType], - AtLeastN[ - Union[ - CompIfMatchType, - OneOf[CompIfMatchType], - AllOf[CompIfMatchType], - ] - ], - AtMostN[ - Union[ - CompIfMatchType, - OneOf[CompIfMatchType], - AllOf[CompIfMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.CompIf]], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - CompIfMatchType, - OneOf[CompIfMatchType], - AllOf[CompIfMatchType], - AtLeastN[ - Union[ - CompIfMatchType, - OneOf[CompIfMatchType], - AllOf[CompIfMatchType], - ] - ], - AtMostN[ - Union[ - CompIfMatchType, - OneOf[CompIfMatchType], - AllOf[CompIfMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.CompIf]], - ] - ], - ] = DoNotCare() - inner_for_in: Union[ - Optional["CompFor"], - MetadataMatchType, - MatchIfTrue[Optional[cst.CompFor]], - DoNotCareSentinel, - OneOf[ - Union[ - Optional["CompFor"], - MetadataMatchType, - MatchIfTrue[Optional[cst.CompFor]], - ] - ], - AllOf[ - Union[ - Optional["CompFor"], - MetadataMatchType, - MatchIfTrue[Optional[cst.CompFor]], - ] - ], - ] = DoNotCare() - asynchronous: Union[ - Optional["Asynchronous"], - MetadataMatchType, - MatchIfTrue[Optional[cst.Asynchronous]], - DoNotCareSentinel, - OneOf[ - Union[ - Optional["Asynchronous"], - MetadataMatchType, - MatchIfTrue[Optional[cst.Asynchronous]], - ] - ], - AllOf[ - Union[ - Optional["Asynchronous"], - MetadataMatchType, - MatchIfTrue[Optional[cst.Asynchronous]], - ] - ], - ] = DoNotCare() - whitespace_before: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - whitespace_after_for: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - whitespace_before_in: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - whitespace_after_in: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class CompIf(BaseMatcherNode): - test: Union[ - BaseExpressionMatchType, - DoNotCareSentinel, - OneOf[BaseExpressionMatchType], - AllOf[BaseExpressionMatchType], - ] = DoNotCare() - whitespace_before: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - whitespace_before_test: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -ComparisonTargetMatchType = Union[ - "ComparisonTarget", MetadataMatchType, MatchIfTrue[cst.ComparisonTarget] -] - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class Comparison(BaseExpression, BaseMatcherNode): - left: Union[ - BaseExpressionMatchType, - DoNotCareSentinel, - OneOf[BaseExpressionMatchType], - AllOf[BaseExpressionMatchType], - ] = DoNotCare() - comparisons: Union[ - Sequence[ - Union[ - ComparisonTargetMatchType, - DoNotCareSentinel, - OneOf[ComparisonTargetMatchType], - AllOf[ComparisonTargetMatchType], - AtLeastN[ - Union[ - ComparisonTargetMatchType, - DoNotCareSentinel, - OneOf[ComparisonTargetMatchType], - AllOf[ComparisonTargetMatchType], - ] - ], - AtMostN[ - Union[ - ComparisonTargetMatchType, - DoNotCareSentinel, - OneOf[ComparisonTargetMatchType], - AllOf[ComparisonTargetMatchType], - ] - ], - ] - ], - DoNotCareSentinel, - MatchIfTrue[Sequence[cst.ComparisonTarget]], - OneOf[ - Union[ - Sequence[ - Union[ - ComparisonTargetMatchType, - OneOf[ComparisonTargetMatchType], - AllOf[ComparisonTargetMatchType], - AtLeastN[ - Union[ - ComparisonTargetMatchType, - OneOf[ComparisonTargetMatchType], - AllOf[ComparisonTargetMatchType], - ] - ], - AtMostN[ - Union[ - ComparisonTargetMatchType, - OneOf[ComparisonTargetMatchType], - AllOf[ComparisonTargetMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.ComparisonTarget]], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - ComparisonTargetMatchType, - OneOf[ComparisonTargetMatchType], - AllOf[ComparisonTargetMatchType], - AtLeastN[ - Union[ - ComparisonTargetMatchType, - OneOf[ComparisonTargetMatchType], - AllOf[ComparisonTargetMatchType], - ] - ], - AtMostN[ - Union[ - ComparisonTargetMatchType, - OneOf[ComparisonTargetMatchType], - AllOf[ComparisonTargetMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.ComparisonTarget]], - ] - ], - ] = DoNotCare() - lpar: Union[ - Sequence[ - Union[ - LeftParenMatchType, - DoNotCareSentinel, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - AtLeastN[ - Union[ - LeftParenMatchType, - DoNotCareSentinel, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - AtMostN[ - Union[ - LeftParenMatchType, - DoNotCareSentinel, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - ] - ], - DoNotCareSentinel, - MatchIfTrue[Sequence[cst.LeftParen]], - OneOf[ - Union[ - Sequence[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - AtLeastN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - AtMostN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.LeftParen]], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - AtLeastN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - AtMostN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.LeftParen]], - ] - ], - ] = DoNotCare() - rpar: Union[ - Sequence[ - Union[ - RightParenMatchType, - DoNotCareSentinel, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - AtLeastN[ - Union[ - RightParenMatchType, - DoNotCareSentinel, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - AtMostN[ - Union[ - RightParenMatchType, - DoNotCareSentinel, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - ] - ], - DoNotCareSentinel, - MatchIfTrue[Sequence[cst.RightParen]], - OneOf[ - Union[ - Sequence[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - AtLeastN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - AtMostN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.RightParen]], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - AtLeastN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - AtMostN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.RightParen]], - ] - ], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -BaseCompOpMatchType = Union[ - "BaseCompOp", MetadataMatchType, MatchIfTrue[cst.BaseCompOp] -] - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class ComparisonTarget(BaseMatcherNode): - operator: Union[ - BaseCompOpMatchType, - DoNotCareSentinel, - OneOf[BaseCompOpMatchType], - AllOf[BaseCompOpMatchType], - ] = DoNotCare() - comparator: Union[ - BaseExpressionMatchType, - DoNotCareSentinel, - OneOf[BaseExpressionMatchType], - AllOf[BaseExpressionMatchType], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -SimpleStringOrFormattedStringMatchType = Union[ - "SimpleString", - "FormattedString", - MetadataMatchType, - MatchIfTrue[Union[cst.SimpleString, cst.FormattedString]], -] -SimpleStringOrFormattedStringOrConcatenatedStringMatchType = Union[ - "SimpleString", - "FormattedString", - "ConcatenatedString", - MetadataMatchType, - MatchIfTrue[Union[cst.SimpleString, cst.FormattedString, cst.ConcatenatedString]], -] - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class ConcatenatedString(BaseExpression, BaseString, BaseMatcherNode): - left: Union[ - SimpleStringOrFormattedStringMatchType, - DoNotCareSentinel, - OneOf[SimpleStringOrFormattedStringMatchType], - AllOf[SimpleStringOrFormattedStringMatchType], - ] = DoNotCare() - right: Union[ - SimpleStringOrFormattedStringOrConcatenatedStringMatchType, - DoNotCareSentinel, - OneOf[SimpleStringOrFormattedStringOrConcatenatedStringMatchType], - AllOf[SimpleStringOrFormattedStringOrConcatenatedStringMatchType], - ] = DoNotCare() - lpar: Union[ - Sequence[ - Union[ - LeftParenMatchType, - DoNotCareSentinel, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - AtLeastN[ - Union[ - LeftParenMatchType, - DoNotCareSentinel, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - AtMostN[ - Union[ - LeftParenMatchType, - DoNotCareSentinel, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - ] - ], - DoNotCareSentinel, - MatchIfTrue[Sequence[cst.LeftParen]], - OneOf[ - Union[ - Sequence[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - AtLeastN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - AtMostN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.LeftParen]], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - AtLeastN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - AtMostN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.LeftParen]], - ] - ], - ] = DoNotCare() - rpar: Union[ - Sequence[ - Union[ - RightParenMatchType, - DoNotCareSentinel, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - AtLeastN[ - Union[ - RightParenMatchType, - DoNotCareSentinel, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - AtMostN[ - Union[ - RightParenMatchType, - DoNotCareSentinel, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - ] - ], - DoNotCareSentinel, - MatchIfTrue[Sequence[cst.RightParen]], - OneOf[ - Union[ - Sequence[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - AtLeastN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - AtMostN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.RightParen]], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - AtLeastN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - AtMostN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.RightParen]], - ] - ], - ] = DoNotCare() - whitespace_between: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class Continue(BaseSmallStatement, BaseMatcherNode): - semicolon: Union[ - SemicolonMatchType, - DoNotCareSentinel, - OneOf[SemicolonMatchType], - AllOf[SemicolonMatchType], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -TrailingWhitespaceMatchType = Union[ - "TrailingWhitespace", MetadataMatchType, MatchIfTrue[cst.TrailingWhitespace] -] - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class Decorator(BaseMatcherNode): - decorator: Union[ - BaseExpressionMatchType, - DoNotCareSentinel, - OneOf[BaseExpressionMatchType], - AllOf[BaseExpressionMatchType], - ] = DoNotCare() - leading_lines: Union[ - Sequence[ - Union[ - EmptyLineMatchType, - DoNotCareSentinel, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - AtLeastN[ - Union[ - EmptyLineMatchType, - DoNotCareSentinel, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - AtMostN[ - Union[ - EmptyLineMatchType, - DoNotCareSentinel, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - ] - ], - DoNotCareSentinel, - MatchIfTrue[Sequence[cst.EmptyLine]], - OneOf[ - Union[ - Sequence[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - AtLeastN[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - AtMostN[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.EmptyLine]], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - AtLeastN[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - AtMostN[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.EmptyLine]], - ] - ], - ] = DoNotCare() - whitespace_after_at: Union[ - SimpleWhitespaceMatchType, - DoNotCareSentinel, - OneOf[SimpleWhitespaceMatchType], - AllOf[SimpleWhitespaceMatchType], - ] = DoNotCare() - trailing_whitespace: Union[ - TrailingWhitespaceMatchType, - DoNotCareSentinel, - OneOf[TrailingWhitespaceMatchType], - AllOf[TrailingWhitespaceMatchType], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -BaseDelTargetExpressionMatchType = Union[ - "BaseDelTargetExpression", - MetadataMatchType, - MatchIfTrue[cst.BaseDelTargetExpression], -] - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class Del(BaseSmallStatement, BaseMatcherNode): - target: Union[ - BaseDelTargetExpressionMatchType, - DoNotCareSentinel, - OneOf[BaseDelTargetExpressionMatchType], - AllOf[BaseDelTargetExpressionMatchType], - ] = DoNotCare() - whitespace_after_del: Union[ - SimpleWhitespaceMatchType, - DoNotCareSentinel, - OneOf[SimpleWhitespaceMatchType], - AllOf[SimpleWhitespaceMatchType], - ] = DoNotCare() - semicolon: Union[ - SemicolonMatchType, - DoNotCareSentinel, - OneOf[SemicolonMatchType], - AllOf[SemicolonMatchType], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -BaseDictElementMatchType = Union[ - "BaseDictElement", MetadataMatchType, MatchIfTrue[cst.BaseDictElement] -] -LeftCurlyBraceMatchType = Union[ - "LeftCurlyBrace", MetadataMatchType, MatchIfTrue[cst.LeftCurlyBrace] -] -RightCurlyBraceMatchType = Union[ - "RightCurlyBrace", MetadataMatchType, MatchIfTrue[cst.RightCurlyBrace] -] - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class Dict(BaseDict, BaseExpression, BaseMatcherNode): - elements: Union[ - Sequence[ - Union[ - BaseDictElementMatchType, - DoNotCareSentinel, - OneOf[BaseDictElementMatchType], - AllOf[BaseDictElementMatchType], - AtLeastN[ - Union[ - BaseDictElementMatchType, - DoNotCareSentinel, - OneOf[BaseDictElementMatchType], - AllOf[BaseDictElementMatchType], - ] - ], - AtMostN[ - Union[ - BaseDictElementMatchType, - DoNotCareSentinel, - OneOf[BaseDictElementMatchType], - AllOf[BaseDictElementMatchType], - ] - ], - ] - ], - DoNotCareSentinel, - MatchIfTrue[Sequence[cst.BaseDictElement]], - OneOf[ - Union[ - Sequence[ - Union[ - BaseDictElementMatchType, - OneOf[BaseDictElementMatchType], - AllOf[BaseDictElementMatchType], - AtLeastN[ - Union[ - BaseDictElementMatchType, - OneOf[BaseDictElementMatchType], - AllOf[BaseDictElementMatchType], - ] - ], - AtMostN[ - Union[ - BaseDictElementMatchType, - OneOf[BaseDictElementMatchType], - AllOf[BaseDictElementMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.BaseDictElement]], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - BaseDictElementMatchType, - OneOf[BaseDictElementMatchType], - AllOf[BaseDictElementMatchType], - AtLeastN[ - Union[ - BaseDictElementMatchType, - OneOf[BaseDictElementMatchType], - AllOf[BaseDictElementMatchType], - ] - ], - AtMostN[ - Union[ - BaseDictElementMatchType, - OneOf[BaseDictElementMatchType], - AllOf[BaseDictElementMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.BaseDictElement]], - ] - ], - ] = DoNotCare() - lbrace: Union[ - LeftCurlyBraceMatchType, - DoNotCareSentinel, - OneOf[LeftCurlyBraceMatchType], - AllOf[LeftCurlyBraceMatchType], - ] = DoNotCare() - rbrace: Union[ - RightCurlyBraceMatchType, - DoNotCareSentinel, - OneOf[RightCurlyBraceMatchType], - AllOf[RightCurlyBraceMatchType], - ] = DoNotCare() - lpar: Union[ - Sequence[ - Union[ - LeftParenMatchType, - DoNotCareSentinel, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - AtLeastN[ - Union[ - LeftParenMatchType, - DoNotCareSentinel, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - AtMostN[ - Union[ - LeftParenMatchType, - DoNotCareSentinel, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - ] - ], - DoNotCareSentinel, - MatchIfTrue[Sequence[cst.LeftParen]], - OneOf[ - Union[ - Sequence[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - AtLeastN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - AtMostN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.LeftParen]], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - AtLeastN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - AtMostN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.LeftParen]], - ] - ], - ] = DoNotCare() - rpar: Union[ - Sequence[ - Union[ - RightParenMatchType, - DoNotCareSentinel, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - AtLeastN[ - Union[ - RightParenMatchType, - DoNotCareSentinel, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - AtMostN[ - Union[ - RightParenMatchType, - DoNotCareSentinel, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - ] - ], - DoNotCareSentinel, - MatchIfTrue[Sequence[cst.RightParen]], - OneOf[ - Union[ - Sequence[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - AtLeastN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - AtMostN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.RightParen]], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - AtLeastN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - AtMostN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.RightParen]], - ] - ], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -CompForMatchType = Union["CompFor", MetadataMatchType, MatchIfTrue[cst.CompFor]] - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class DictComp(BaseComp, BaseDict, BaseExpression, BaseMatcherNode): - key: Union[ - BaseExpressionMatchType, - DoNotCareSentinel, - OneOf[BaseExpressionMatchType], - AllOf[BaseExpressionMatchType], - ] = DoNotCare() - value: Union[ - BaseExpressionMatchType, - DoNotCareSentinel, - OneOf[BaseExpressionMatchType], - AllOf[BaseExpressionMatchType], - ] = DoNotCare() - for_in: Union[ - CompForMatchType, - DoNotCareSentinel, - OneOf[CompForMatchType], - AllOf[CompForMatchType], - ] = DoNotCare() - lbrace: Union[ - LeftCurlyBraceMatchType, - DoNotCareSentinel, - OneOf[LeftCurlyBraceMatchType], - AllOf[LeftCurlyBraceMatchType], - ] = DoNotCare() - rbrace: Union[ - RightCurlyBraceMatchType, - DoNotCareSentinel, - OneOf[RightCurlyBraceMatchType], - AllOf[RightCurlyBraceMatchType], - ] = DoNotCare() - lpar: Union[ - Sequence[ - Union[ - LeftParenMatchType, - DoNotCareSentinel, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - AtLeastN[ - Union[ - LeftParenMatchType, - DoNotCareSentinel, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - AtMostN[ - Union[ - LeftParenMatchType, - DoNotCareSentinel, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - ] - ], - DoNotCareSentinel, - MatchIfTrue[Sequence[cst.LeftParen]], - OneOf[ - Union[ - Sequence[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - AtLeastN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - AtMostN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.LeftParen]], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - AtLeastN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - AtMostN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.LeftParen]], - ] - ], - ] = DoNotCare() - rpar: Union[ - Sequence[ - Union[ - RightParenMatchType, - DoNotCareSentinel, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - AtLeastN[ - Union[ - RightParenMatchType, - DoNotCareSentinel, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - AtMostN[ - Union[ - RightParenMatchType, - DoNotCareSentinel, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - ] - ], - DoNotCareSentinel, - MatchIfTrue[Sequence[cst.RightParen]], - OneOf[ - Union[ - Sequence[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - AtLeastN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - AtMostN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.RightParen]], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - AtLeastN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - AtMostN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.RightParen]], - ] - ], - ] = DoNotCare() - whitespace_before_colon: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - whitespace_after_colon: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class DictElement(BaseDictElement, BaseMatcherNode): - key: Union[ - BaseExpressionMatchType, - DoNotCareSentinel, - OneOf[BaseExpressionMatchType], - AllOf[BaseExpressionMatchType], - ] = DoNotCare() - value: Union[ - BaseExpressionMatchType, - DoNotCareSentinel, - OneOf[BaseExpressionMatchType], - AllOf[BaseExpressionMatchType], - ] = DoNotCare() - comma: Union[ - CommaMatchType, DoNotCareSentinel, OneOf[CommaMatchType], AllOf[CommaMatchType] - ] = DoNotCare() - whitespace_before_colon: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - whitespace_after_colon: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class Divide(BaseBinaryOp, BaseMatcherNode): - whitespace_before: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - whitespace_after: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class DivideAssign(BaseAugOp, BaseMatcherNode): - whitespace_before: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - whitespace_after: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class Dot(BaseMatcherNode): - whitespace_before: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - whitespace_after: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class Element(BaseElement, BaseMatcherNode): - value: Union[ - BaseExpressionMatchType, - DoNotCareSentinel, - OneOf[BaseExpressionMatchType], - AllOf[BaseExpressionMatchType], - ] = DoNotCare() - comma: Union[ - CommaMatchType, DoNotCareSentinel, OneOf[CommaMatchType], AllOf[CommaMatchType] - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class Ellipsis(BaseExpression, BaseMatcherNode): - lpar: Union[ - Sequence[ - Union[ - LeftParenMatchType, - DoNotCareSentinel, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - AtLeastN[ - Union[ - LeftParenMatchType, - DoNotCareSentinel, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - AtMostN[ - Union[ - LeftParenMatchType, - DoNotCareSentinel, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - ] - ], - DoNotCareSentinel, - MatchIfTrue[Sequence[cst.LeftParen]], - OneOf[ - Union[ - Sequence[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - AtLeastN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - AtMostN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.LeftParen]], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - AtLeastN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - AtMostN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.LeftParen]], - ] - ], - ] = DoNotCare() - rpar: Union[ - Sequence[ - Union[ - RightParenMatchType, - DoNotCareSentinel, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - AtLeastN[ - Union[ - RightParenMatchType, - DoNotCareSentinel, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - AtMostN[ - Union[ - RightParenMatchType, - DoNotCareSentinel, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - ] - ], - DoNotCareSentinel, - MatchIfTrue[Sequence[cst.RightParen]], - OneOf[ - Union[ - Sequence[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - AtLeastN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - AtMostN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.RightParen]], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - AtLeastN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - AtMostN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.RightParen]], - ] - ], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class Else(BaseMatcherNode): - body: Union[ - BaseSuiteMatchType, - DoNotCareSentinel, - OneOf[BaseSuiteMatchType], - AllOf[BaseSuiteMatchType], - ] = DoNotCare() - leading_lines: Union[ - Sequence[ - Union[ - EmptyLineMatchType, - DoNotCareSentinel, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - AtLeastN[ - Union[ - EmptyLineMatchType, - DoNotCareSentinel, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - AtMostN[ - Union[ - EmptyLineMatchType, - DoNotCareSentinel, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - ] - ], - DoNotCareSentinel, - MatchIfTrue[Sequence[cst.EmptyLine]], - OneOf[ - Union[ - Sequence[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - AtLeastN[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - AtMostN[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.EmptyLine]], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - AtLeastN[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - AtMostN[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.EmptyLine]], - ] - ], - ] = DoNotCare() - whitespace_before_colon: Union[ - SimpleWhitespaceMatchType, - DoNotCareSentinel, - OneOf[SimpleWhitespaceMatchType], - AllOf[SimpleWhitespaceMatchType], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -boolMatchType = Union[bool, MetadataMatchType, MatchIfTrue[bool]] -NewlineMatchType = Union["Newline", MetadataMatchType, MatchIfTrue[cst.Newline]] - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class EmptyLine(BaseMatcherNode): - indent: Union[ - boolMatchType, DoNotCareSentinel, OneOf[boolMatchType], AllOf[boolMatchType] - ] = DoNotCare() - whitespace: Union[ - SimpleWhitespaceMatchType, - DoNotCareSentinel, - OneOf[SimpleWhitespaceMatchType], - AllOf[SimpleWhitespaceMatchType], - ] = DoNotCare() - comment: Union[ - Optional["Comment"], - MetadataMatchType, - MatchIfTrue[Optional[cst.Comment]], - DoNotCareSentinel, - OneOf[ - Union[ - Optional["Comment"], - MetadataMatchType, - MatchIfTrue[Optional[cst.Comment]], - ] - ], - AllOf[ - Union[ - Optional["Comment"], - MetadataMatchType, - MatchIfTrue[Optional[cst.Comment]], - ] - ], - ] = DoNotCare() - newline: Union[ - NewlineMatchType, - DoNotCareSentinel, - OneOf[NewlineMatchType], - AllOf[NewlineMatchType], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class Equal(BaseCompOp, BaseMatcherNode): - whitespace_before: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - whitespace_after: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class ExceptHandler(BaseMatcherNode): - body: Union[ - BaseSuiteMatchType, - DoNotCareSentinel, - OneOf[BaseSuiteMatchType], - AllOf[BaseSuiteMatchType], - ] = DoNotCare() - type: Union[ - Optional["BaseExpression"], - MetadataMatchType, - MatchIfTrue[Optional[cst.BaseExpression]], - DoNotCareSentinel, - OneOf[ - Union[ - Optional["BaseExpression"], - MetadataMatchType, - MatchIfTrue[Optional[cst.BaseExpression]], - ] - ], - AllOf[ - Union[ - Optional["BaseExpression"], - MetadataMatchType, - MatchIfTrue[Optional[cst.BaseExpression]], - ] - ], - ] = DoNotCare() - name: Union[ - Optional["AsName"], - MetadataMatchType, - MatchIfTrue[Optional[cst.AsName]], - DoNotCareSentinel, - OneOf[ - Union[ - Optional["AsName"], MetadataMatchType, MatchIfTrue[Optional[cst.AsName]] - ] - ], - AllOf[ - Union[ - Optional["AsName"], MetadataMatchType, MatchIfTrue[Optional[cst.AsName]] - ] - ], - ] = DoNotCare() - leading_lines: Union[ - Sequence[ - Union[ - EmptyLineMatchType, - DoNotCareSentinel, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - AtLeastN[ - Union[ - EmptyLineMatchType, - DoNotCareSentinel, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - AtMostN[ - Union[ - EmptyLineMatchType, - DoNotCareSentinel, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - ] - ], - DoNotCareSentinel, - MatchIfTrue[Sequence[cst.EmptyLine]], - OneOf[ - Union[ - Sequence[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - AtLeastN[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - AtMostN[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.EmptyLine]], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - AtLeastN[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - AtMostN[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.EmptyLine]], - ] - ], - ] = DoNotCare() - whitespace_after_except: Union[ - SimpleWhitespaceMatchType, - DoNotCareSentinel, - OneOf[SimpleWhitespaceMatchType], - AllOf[SimpleWhitespaceMatchType], - ] = DoNotCare() - whitespace_before_colon: Union[ - SimpleWhitespaceMatchType, - DoNotCareSentinel, - OneOf[SimpleWhitespaceMatchType], - AllOf[SimpleWhitespaceMatchType], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class ExceptStarHandler(BaseMatcherNode): - body: Union[ - BaseSuiteMatchType, - DoNotCareSentinel, - OneOf[BaseSuiteMatchType], - AllOf[BaseSuiteMatchType], - ] = DoNotCare() - type: Union[ - BaseExpressionMatchType, - DoNotCareSentinel, - OneOf[BaseExpressionMatchType], - AllOf[BaseExpressionMatchType], - ] = DoNotCare() - name: Union[ - Optional["AsName"], - MetadataMatchType, - MatchIfTrue[Optional[cst.AsName]], - DoNotCareSentinel, - OneOf[ - Union[ - Optional["AsName"], MetadataMatchType, MatchIfTrue[Optional[cst.AsName]] - ] - ], - AllOf[ - Union[ - Optional["AsName"], MetadataMatchType, MatchIfTrue[Optional[cst.AsName]] - ] - ], - ] = DoNotCare() - leading_lines: Union[ - Sequence[ - Union[ - EmptyLineMatchType, - DoNotCareSentinel, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - AtLeastN[ - Union[ - EmptyLineMatchType, - DoNotCareSentinel, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - AtMostN[ - Union[ - EmptyLineMatchType, - DoNotCareSentinel, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - ] - ], - DoNotCareSentinel, - MatchIfTrue[Sequence[cst.EmptyLine]], - OneOf[ - Union[ - Sequence[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - AtLeastN[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - AtMostN[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.EmptyLine]], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - AtLeastN[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - AtMostN[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.EmptyLine]], - ] - ], - ] = DoNotCare() - whitespace_after_except: Union[ - SimpleWhitespaceMatchType, - DoNotCareSentinel, - OneOf[SimpleWhitespaceMatchType], - AllOf[SimpleWhitespaceMatchType], - ] = DoNotCare() - whitespace_after_star: Union[ - SimpleWhitespaceMatchType, - DoNotCareSentinel, - OneOf[SimpleWhitespaceMatchType], - AllOf[SimpleWhitespaceMatchType], - ] = DoNotCare() - whitespace_before_colon: Union[ - SimpleWhitespaceMatchType, - DoNotCareSentinel, - OneOf[SimpleWhitespaceMatchType], - AllOf[SimpleWhitespaceMatchType], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class Expr(BaseSmallStatement, BaseMatcherNode): - value: Union[ - BaseExpressionMatchType, - DoNotCareSentinel, - OneOf[BaseExpressionMatchType], - AllOf[BaseExpressionMatchType], - ] = DoNotCare() - semicolon: Union[ - SemicolonMatchType, - DoNotCareSentinel, - OneOf[SemicolonMatchType], - AllOf[SemicolonMatchType], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class Finally(BaseMatcherNode): - body: Union[ - BaseSuiteMatchType, - DoNotCareSentinel, - OneOf[BaseSuiteMatchType], - AllOf[BaseSuiteMatchType], - ] = DoNotCare() - leading_lines: Union[ - Sequence[ - Union[ - EmptyLineMatchType, - DoNotCareSentinel, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - AtLeastN[ - Union[ - EmptyLineMatchType, - DoNotCareSentinel, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - AtMostN[ - Union[ - EmptyLineMatchType, - DoNotCareSentinel, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - ] - ], - DoNotCareSentinel, - MatchIfTrue[Sequence[cst.EmptyLine]], - OneOf[ - Union[ - Sequence[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - AtLeastN[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - AtMostN[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.EmptyLine]], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - AtLeastN[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - AtMostN[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.EmptyLine]], - ] - ], - ] = DoNotCare() - whitespace_before_colon: Union[ - SimpleWhitespaceMatchType, - DoNotCareSentinel, - OneOf[SimpleWhitespaceMatchType], - AllOf[SimpleWhitespaceMatchType], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class Float(BaseExpression, BaseNumber, BaseMatcherNode): - value: Union[ - strMatchType, DoNotCareSentinel, OneOf[strMatchType], AllOf[strMatchType] - ] = DoNotCare() - lpar: Union[ - Sequence[ - Union[ - LeftParenMatchType, - DoNotCareSentinel, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - AtLeastN[ - Union[ - LeftParenMatchType, - DoNotCareSentinel, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - AtMostN[ - Union[ - LeftParenMatchType, - DoNotCareSentinel, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - ] - ], - DoNotCareSentinel, - MatchIfTrue[Sequence[cst.LeftParen]], - OneOf[ - Union[ - Sequence[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - AtLeastN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - AtMostN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.LeftParen]], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - AtLeastN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - AtMostN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.LeftParen]], - ] - ], - ] = DoNotCare() - rpar: Union[ - Sequence[ - Union[ - RightParenMatchType, - DoNotCareSentinel, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - AtLeastN[ - Union[ - RightParenMatchType, - DoNotCareSentinel, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - AtMostN[ - Union[ - RightParenMatchType, - DoNotCareSentinel, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - ] - ], - DoNotCareSentinel, - MatchIfTrue[Sequence[cst.RightParen]], - OneOf[ - Union[ - Sequence[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - AtLeastN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - AtMostN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.RightParen]], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - AtLeastN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - AtMostN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.RightParen]], - ] - ], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class FloorDivide(BaseBinaryOp, BaseMatcherNode): - whitespace_before: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - whitespace_after: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class FloorDivideAssign(BaseAugOp, BaseMatcherNode): - whitespace_before: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - whitespace_after: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class For(BaseCompoundStatement, BaseStatement, BaseMatcherNode): - target: Union[ - BaseAssignTargetExpressionMatchType, - DoNotCareSentinel, - OneOf[BaseAssignTargetExpressionMatchType], - AllOf[BaseAssignTargetExpressionMatchType], - ] = DoNotCare() - iter: Union[ - BaseExpressionMatchType, - DoNotCareSentinel, - OneOf[BaseExpressionMatchType], - AllOf[BaseExpressionMatchType], - ] = DoNotCare() - body: Union[ - BaseSuiteMatchType, - DoNotCareSentinel, - OneOf[BaseSuiteMatchType], - AllOf[BaseSuiteMatchType], - ] = DoNotCare() - orelse: Union[ - Optional["Else"], - MetadataMatchType, - MatchIfTrue[Optional[cst.Else]], - DoNotCareSentinel, - OneOf[ - Union[Optional["Else"], MetadataMatchType, MatchIfTrue[Optional[cst.Else]]] - ], - AllOf[ - Union[Optional["Else"], MetadataMatchType, MatchIfTrue[Optional[cst.Else]]] - ], - ] = DoNotCare() - asynchronous: Union[ - Optional["Asynchronous"], - MetadataMatchType, - MatchIfTrue[Optional[cst.Asynchronous]], - DoNotCareSentinel, - OneOf[ - Union[ - Optional["Asynchronous"], - MetadataMatchType, - MatchIfTrue[Optional[cst.Asynchronous]], - ] - ], - AllOf[ - Union[ - Optional["Asynchronous"], - MetadataMatchType, - MatchIfTrue[Optional[cst.Asynchronous]], - ] - ], - ] = DoNotCare() - leading_lines: Union[ - Sequence[ - Union[ - EmptyLineMatchType, - DoNotCareSentinel, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - AtLeastN[ - Union[ - EmptyLineMatchType, - DoNotCareSentinel, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - AtMostN[ - Union[ - EmptyLineMatchType, - DoNotCareSentinel, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - ] - ], - DoNotCareSentinel, - MatchIfTrue[Sequence[cst.EmptyLine]], - OneOf[ - Union[ - Sequence[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - AtLeastN[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - AtMostN[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.EmptyLine]], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - AtLeastN[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - AtMostN[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.EmptyLine]], - ] - ], - ] = DoNotCare() - whitespace_after_for: Union[ - SimpleWhitespaceMatchType, - DoNotCareSentinel, - OneOf[SimpleWhitespaceMatchType], - AllOf[SimpleWhitespaceMatchType], - ] = DoNotCare() - whitespace_before_in: Union[ - SimpleWhitespaceMatchType, - DoNotCareSentinel, - OneOf[SimpleWhitespaceMatchType], - AllOf[SimpleWhitespaceMatchType], - ] = DoNotCare() - whitespace_after_in: Union[ - SimpleWhitespaceMatchType, - DoNotCareSentinel, - OneOf[SimpleWhitespaceMatchType], - AllOf[SimpleWhitespaceMatchType], - ] = DoNotCare() - whitespace_before_colon: Union[ - SimpleWhitespaceMatchType, - DoNotCareSentinel, - OneOf[SimpleWhitespaceMatchType], - AllOf[SimpleWhitespaceMatchType], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -BaseFormattedStringContentMatchType = Union[ - "BaseFormattedStringContent", - MetadataMatchType, - MatchIfTrue[cst.BaseFormattedStringContent], -] - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class FormattedString(BaseExpression, BaseString, BaseMatcherNode): - parts: Union[ - Sequence[ - Union[ - BaseFormattedStringContentMatchType, - DoNotCareSentinel, - OneOf[BaseFormattedStringContentMatchType], - AllOf[BaseFormattedStringContentMatchType], - AtLeastN[ - Union[ - BaseFormattedStringContentMatchType, - DoNotCareSentinel, - OneOf[BaseFormattedStringContentMatchType], - AllOf[BaseFormattedStringContentMatchType], - ] - ], - AtMostN[ - Union[ - BaseFormattedStringContentMatchType, - DoNotCareSentinel, - OneOf[BaseFormattedStringContentMatchType], - AllOf[BaseFormattedStringContentMatchType], - ] - ], - ] - ], - DoNotCareSentinel, - MatchIfTrue[Sequence[cst.BaseFormattedStringContent]], - OneOf[ - Union[ - Sequence[ - Union[ - BaseFormattedStringContentMatchType, - OneOf[BaseFormattedStringContentMatchType], - AllOf[BaseFormattedStringContentMatchType], - AtLeastN[ - Union[ - BaseFormattedStringContentMatchType, - OneOf[BaseFormattedStringContentMatchType], - AllOf[BaseFormattedStringContentMatchType], - ] - ], - AtMostN[ - Union[ - BaseFormattedStringContentMatchType, - OneOf[BaseFormattedStringContentMatchType], - AllOf[BaseFormattedStringContentMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.BaseFormattedStringContent]], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - BaseFormattedStringContentMatchType, - OneOf[BaseFormattedStringContentMatchType], - AllOf[BaseFormattedStringContentMatchType], - AtLeastN[ - Union[ - BaseFormattedStringContentMatchType, - OneOf[BaseFormattedStringContentMatchType], - AllOf[BaseFormattedStringContentMatchType], - ] - ], - AtMostN[ - Union[ - BaseFormattedStringContentMatchType, - OneOf[BaseFormattedStringContentMatchType], - AllOf[BaseFormattedStringContentMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.BaseFormattedStringContent]], - ] - ], - ] = DoNotCare() - start: Union[ - strMatchType, DoNotCareSentinel, OneOf[strMatchType], AllOf[strMatchType] - ] = DoNotCare() - end: Union[ - Literal['"', "'", '"""', "'''"], - MetadataMatchType, - MatchIfTrue[Literal['"', "'", '"""', "'''"]], - DoNotCareSentinel, - OneOf[ - Union[ - Literal['"', "'", '"""', "'''"], - MetadataMatchType, - MatchIfTrue[Literal['"', "'", '"""', "'''"]], - ] - ], - AllOf[ - Union[ - Literal['"', "'", '"""', "'''"], - MetadataMatchType, - MatchIfTrue[Literal['"', "'", '"""', "'''"]], - ] - ], - ] = DoNotCare() - lpar: Union[ - Sequence[ - Union[ - LeftParenMatchType, - DoNotCareSentinel, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - AtLeastN[ - Union[ - LeftParenMatchType, - DoNotCareSentinel, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - AtMostN[ - Union[ - LeftParenMatchType, - DoNotCareSentinel, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - ] - ], - DoNotCareSentinel, - MatchIfTrue[Sequence[cst.LeftParen]], - OneOf[ - Union[ - Sequence[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - AtLeastN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - AtMostN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.LeftParen]], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - AtLeastN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - AtMostN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.LeftParen]], - ] - ], - ] = DoNotCare() - rpar: Union[ - Sequence[ - Union[ - RightParenMatchType, - DoNotCareSentinel, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - AtLeastN[ - Union[ - RightParenMatchType, - DoNotCareSentinel, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - AtMostN[ - Union[ - RightParenMatchType, - DoNotCareSentinel, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - ] - ], - DoNotCareSentinel, - MatchIfTrue[Sequence[cst.RightParen]], - OneOf[ - Union[ - Sequence[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - AtLeastN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - AtMostN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.RightParen]], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - AtLeastN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - AtMostN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.RightParen]], - ] - ], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class FormattedStringExpression(BaseFormattedStringContent, BaseMatcherNode): - expression: Union[ - BaseExpressionMatchType, - DoNotCareSentinel, - OneOf[BaseExpressionMatchType], - AllOf[BaseExpressionMatchType], - ] = DoNotCare() - conversion: Union[ - Optional[str], - MetadataMatchType, - MatchIfTrue[Optional[str]], - DoNotCareSentinel, - OneOf[Union[Optional[str], MetadataMatchType, MatchIfTrue[Optional[str]]]], - AllOf[Union[Optional[str], MetadataMatchType, MatchIfTrue[Optional[str]]]], - ] = DoNotCare() - format_spec: Union[ - Optional[Sequence["BaseFormattedStringContent"]], - MetadataMatchType, - MatchIfTrue[Optional[Sequence[cst.BaseFormattedStringContent]]], - DoNotCareSentinel, - OneOf[ - Union[ - Optional[Sequence["BaseFormattedStringContent"]], - MetadataMatchType, - MatchIfTrue[Optional[Sequence[cst.BaseFormattedStringContent]]], - ] - ], - AllOf[ - Union[ - Optional[Sequence["BaseFormattedStringContent"]], - MetadataMatchType, - MatchIfTrue[Optional[Sequence[cst.BaseFormattedStringContent]]], - ] - ], - ] = DoNotCare() - whitespace_before_expression: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - whitespace_after_expression: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - equal: Union[ - Optional["AssignEqual"], - MetadataMatchType, - MatchIfTrue[Optional[cst.AssignEqual]], - DoNotCareSentinel, - OneOf[ - Union[ - Optional["AssignEqual"], - MetadataMatchType, - MatchIfTrue[Optional[cst.AssignEqual]], - ] - ], - AllOf[ - Union[ - Optional["AssignEqual"], - MetadataMatchType, - MatchIfTrue[Optional[cst.AssignEqual]], - ] - ], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class FormattedStringText(BaseFormattedStringContent, BaseMatcherNode): - value: Union[ - strMatchType, DoNotCareSentinel, OneOf[strMatchType], AllOf[strMatchType] - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class From(BaseMatcherNode): - item: Union[ - BaseExpressionMatchType, - DoNotCareSentinel, - OneOf[BaseExpressionMatchType], - AllOf[BaseExpressionMatchType], - ] = DoNotCare() - whitespace_before_from: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - whitespace_after_from: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -ParametersMatchType = Union[ - "Parameters", MetadataMatchType, MatchIfTrue[cst.Parameters] -] - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class FunctionDef(BaseCompoundStatement, BaseStatement, BaseMatcherNode): - name: Union[ - NameMatchType, DoNotCareSentinel, OneOf[NameMatchType], AllOf[NameMatchType] - ] = DoNotCare() - params: Union[ - ParametersMatchType, - DoNotCareSentinel, - OneOf[ParametersMatchType], - AllOf[ParametersMatchType], - ] = DoNotCare() - body: Union[ - BaseSuiteMatchType, - DoNotCareSentinel, - OneOf[BaseSuiteMatchType], - AllOf[BaseSuiteMatchType], - ] = DoNotCare() - decorators: Union[ - Sequence[ - Union[ - DecoratorMatchType, - DoNotCareSentinel, - OneOf[DecoratorMatchType], - AllOf[DecoratorMatchType], - AtLeastN[ - Union[ - DecoratorMatchType, - DoNotCareSentinel, - OneOf[DecoratorMatchType], - AllOf[DecoratorMatchType], - ] - ], - AtMostN[ - Union[ - DecoratorMatchType, - DoNotCareSentinel, - OneOf[DecoratorMatchType], - AllOf[DecoratorMatchType], - ] - ], - ] - ], - DoNotCareSentinel, - MatchIfTrue[Sequence[cst.Decorator]], - OneOf[ - Union[ - Sequence[ - Union[ - DecoratorMatchType, - OneOf[DecoratorMatchType], - AllOf[DecoratorMatchType], - AtLeastN[ - Union[ - DecoratorMatchType, - OneOf[DecoratorMatchType], - AllOf[DecoratorMatchType], - ] - ], - AtMostN[ - Union[ - DecoratorMatchType, - OneOf[DecoratorMatchType], - AllOf[DecoratorMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.Decorator]], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - DecoratorMatchType, - OneOf[DecoratorMatchType], - AllOf[DecoratorMatchType], - AtLeastN[ - Union[ - DecoratorMatchType, - OneOf[DecoratorMatchType], - AllOf[DecoratorMatchType], - ] - ], - AtMostN[ - Union[ - DecoratorMatchType, - OneOf[DecoratorMatchType], - AllOf[DecoratorMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.Decorator]], - ] - ], - ] = DoNotCare() - returns: Union[ - Optional["Annotation"], - MetadataMatchType, - MatchIfTrue[Optional[cst.Annotation]], - DoNotCareSentinel, - OneOf[ - Union[ - Optional["Annotation"], - MetadataMatchType, - MatchIfTrue[Optional[cst.Annotation]], - ] - ], - AllOf[ - Union[ - Optional["Annotation"], - MetadataMatchType, - MatchIfTrue[Optional[cst.Annotation]], - ] - ], - ] = DoNotCare() - asynchronous: Union[ - Optional["Asynchronous"], - MetadataMatchType, - MatchIfTrue[Optional[cst.Asynchronous]], - DoNotCareSentinel, - OneOf[ - Union[ - Optional["Asynchronous"], - MetadataMatchType, - MatchIfTrue[Optional[cst.Asynchronous]], - ] - ], - AllOf[ - Union[ - Optional["Asynchronous"], - MetadataMatchType, - MatchIfTrue[Optional[cst.Asynchronous]], - ] - ], - ] = DoNotCare() - leading_lines: Union[ - Sequence[ - Union[ - EmptyLineMatchType, - DoNotCareSentinel, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - AtLeastN[ - Union[ - EmptyLineMatchType, - DoNotCareSentinel, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - AtMostN[ - Union[ - EmptyLineMatchType, - DoNotCareSentinel, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - ] - ], - DoNotCareSentinel, - MatchIfTrue[Sequence[cst.EmptyLine]], - OneOf[ - Union[ - Sequence[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - AtLeastN[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - AtMostN[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.EmptyLine]], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - AtLeastN[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - AtMostN[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.EmptyLine]], - ] - ], - ] = DoNotCare() - lines_after_decorators: Union[ - Sequence[ - Union[ - EmptyLineMatchType, - DoNotCareSentinel, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - AtLeastN[ - Union[ - EmptyLineMatchType, - DoNotCareSentinel, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - AtMostN[ - Union[ - EmptyLineMatchType, - DoNotCareSentinel, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - ] - ], - DoNotCareSentinel, - MatchIfTrue[Sequence[cst.EmptyLine]], - OneOf[ - Union[ - Sequence[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - AtLeastN[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - AtMostN[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.EmptyLine]], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - AtLeastN[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - AtMostN[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.EmptyLine]], - ] - ], - ] = DoNotCare() - whitespace_after_def: Union[ - SimpleWhitespaceMatchType, - DoNotCareSentinel, - OneOf[SimpleWhitespaceMatchType], - AllOf[SimpleWhitespaceMatchType], - ] = DoNotCare() - whitespace_after_name: Union[ - SimpleWhitespaceMatchType, - DoNotCareSentinel, - OneOf[SimpleWhitespaceMatchType], - AllOf[SimpleWhitespaceMatchType], - ] = DoNotCare() - whitespace_before_params: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - whitespace_before_colon: Union[ - SimpleWhitespaceMatchType, - DoNotCareSentinel, - OneOf[SimpleWhitespaceMatchType], - AllOf[SimpleWhitespaceMatchType], - ] = DoNotCare() - type_parameters: Union[ - Optional["TypeParameters"], - MetadataMatchType, - MatchIfTrue[Optional[cst.TypeParameters]], - DoNotCareSentinel, - OneOf[ - Union[ - Optional["TypeParameters"], - MetadataMatchType, - MatchIfTrue[Optional[cst.TypeParameters]], - ] - ], - AllOf[ - Union[ - Optional["TypeParameters"], - MetadataMatchType, - MatchIfTrue[Optional[cst.TypeParameters]], - ] - ], - ] = DoNotCare() - whitespace_after_type_parameters: Union[ - SimpleWhitespaceMatchType, - DoNotCareSentinel, - OneOf[SimpleWhitespaceMatchType], - AllOf[SimpleWhitespaceMatchType], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class GeneratorExp(BaseComp, BaseExpression, BaseSimpleComp, BaseMatcherNode): - elt: Union[ - BaseExpressionMatchType, - DoNotCareSentinel, - OneOf[BaseExpressionMatchType], - AllOf[BaseExpressionMatchType], - ] = DoNotCare() - for_in: Union[ - CompForMatchType, - DoNotCareSentinel, - OneOf[CompForMatchType], - AllOf[CompForMatchType], - ] = DoNotCare() - lpar: Union[ - Sequence[ - Union[ - LeftParenMatchType, - DoNotCareSentinel, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - AtLeastN[ - Union[ - LeftParenMatchType, - DoNotCareSentinel, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - AtMostN[ - Union[ - LeftParenMatchType, - DoNotCareSentinel, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - ] - ], - DoNotCareSentinel, - MatchIfTrue[Sequence[cst.LeftParen]], - OneOf[ - Union[ - Sequence[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - AtLeastN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - AtMostN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.LeftParen]], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - AtLeastN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - AtMostN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.LeftParen]], - ] - ], - ] = DoNotCare() - rpar: Union[ - Sequence[ - Union[ - RightParenMatchType, - DoNotCareSentinel, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - AtLeastN[ - Union[ - RightParenMatchType, - DoNotCareSentinel, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - AtMostN[ - Union[ - RightParenMatchType, - DoNotCareSentinel, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - ] - ], - DoNotCareSentinel, - MatchIfTrue[Sequence[cst.RightParen]], - OneOf[ - Union[ - Sequence[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - AtLeastN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - AtMostN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.RightParen]], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - AtLeastN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - AtMostN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.RightParen]], - ] - ], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -NameItemMatchType = Union["NameItem", MetadataMatchType, MatchIfTrue[cst.NameItem]] - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class Global(BaseSmallStatement, BaseMatcherNode): - names: Union[ - Sequence[ - Union[ - NameItemMatchType, - DoNotCareSentinel, - OneOf[NameItemMatchType], - AllOf[NameItemMatchType], - AtLeastN[ - Union[ - NameItemMatchType, - DoNotCareSentinel, - OneOf[NameItemMatchType], - AllOf[NameItemMatchType], - ] - ], - AtMostN[ - Union[ - NameItemMatchType, - DoNotCareSentinel, - OneOf[NameItemMatchType], - AllOf[NameItemMatchType], - ] - ], - ] - ], - DoNotCareSentinel, - MatchIfTrue[Sequence[cst.NameItem]], - OneOf[ - Union[ - Sequence[ - Union[ - NameItemMatchType, - OneOf[NameItemMatchType], - AllOf[NameItemMatchType], - AtLeastN[ - Union[ - NameItemMatchType, - OneOf[NameItemMatchType], - AllOf[NameItemMatchType], - ] - ], - AtMostN[ - Union[ - NameItemMatchType, - OneOf[NameItemMatchType], - AllOf[NameItemMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.NameItem]], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - NameItemMatchType, - OneOf[NameItemMatchType], - AllOf[NameItemMatchType], - AtLeastN[ - Union[ - NameItemMatchType, - OneOf[NameItemMatchType], - AllOf[NameItemMatchType], - ] - ], - AtMostN[ - Union[ - NameItemMatchType, - OneOf[NameItemMatchType], - AllOf[NameItemMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.NameItem]], - ] - ], - ] = DoNotCare() - whitespace_after_global: Union[ - SimpleWhitespaceMatchType, - DoNotCareSentinel, - OneOf[SimpleWhitespaceMatchType], - AllOf[SimpleWhitespaceMatchType], - ] = DoNotCare() - semicolon: Union[ - SemicolonMatchType, - DoNotCareSentinel, - OneOf[SemicolonMatchType], - AllOf[SemicolonMatchType], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class GreaterThan(BaseCompOp, BaseMatcherNode): - whitespace_before: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - whitespace_after: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class GreaterThanEqual(BaseCompOp, BaseMatcherNode): - whitespace_before: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - whitespace_after: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -IfOrElseOrNoneMatchType = Union[ - "If", "Else", None, MetadataMatchType, MatchIfTrue[Union[cst.If, cst.Else, None]] -] - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class If(BaseCompoundStatement, BaseStatement, BaseMatcherNode): - test: Union[ - BaseExpressionMatchType, - DoNotCareSentinel, - OneOf[BaseExpressionMatchType], - AllOf[BaseExpressionMatchType], - ] = DoNotCare() - body: Union[ - BaseSuiteMatchType, - DoNotCareSentinel, - OneOf[BaseSuiteMatchType], - AllOf[BaseSuiteMatchType], - ] = DoNotCare() - orelse: Union[ - IfOrElseOrNoneMatchType, - DoNotCareSentinel, - OneOf[IfOrElseOrNoneMatchType], - AllOf[IfOrElseOrNoneMatchType], - ] = DoNotCare() - leading_lines: Union[ - Sequence[ - Union[ - EmptyLineMatchType, - DoNotCareSentinel, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - AtLeastN[ - Union[ - EmptyLineMatchType, - DoNotCareSentinel, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - AtMostN[ - Union[ - EmptyLineMatchType, - DoNotCareSentinel, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - ] - ], - DoNotCareSentinel, - MatchIfTrue[Sequence[cst.EmptyLine]], - OneOf[ - Union[ - Sequence[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - AtLeastN[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - AtMostN[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.EmptyLine]], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - AtLeastN[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - AtMostN[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.EmptyLine]], - ] - ], - ] = DoNotCare() - whitespace_before_test: Union[ - SimpleWhitespaceMatchType, - DoNotCareSentinel, - OneOf[SimpleWhitespaceMatchType], - AllOf[SimpleWhitespaceMatchType], - ] = DoNotCare() - whitespace_after_test: Union[ - SimpleWhitespaceMatchType, - DoNotCareSentinel, - OneOf[SimpleWhitespaceMatchType], - AllOf[SimpleWhitespaceMatchType], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class IfExp(BaseExpression, BaseMatcherNode): - test: Union[ - BaseExpressionMatchType, - DoNotCareSentinel, - OneOf[BaseExpressionMatchType], - AllOf[BaseExpressionMatchType], - ] = DoNotCare() - body: Union[ - BaseExpressionMatchType, - DoNotCareSentinel, - OneOf[BaseExpressionMatchType], - AllOf[BaseExpressionMatchType], - ] = DoNotCare() - orelse: Union[ - BaseExpressionMatchType, - DoNotCareSentinel, - OneOf[BaseExpressionMatchType], - AllOf[BaseExpressionMatchType], - ] = DoNotCare() - lpar: Union[ - Sequence[ - Union[ - LeftParenMatchType, - DoNotCareSentinel, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - AtLeastN[ - Union[ - LeftParenMatchType, - DoNotCareSentinel, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - AtMostN[ - Union[ - LeftParenMatchType, - DoNotCareSentinel, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - ] - ], - DoNotCareSentinel, - MatchIfTrue[Sequence[cst.LeftParen]], - OneOf[ - Union[ - Sequence[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - AtLeastN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - AtMostN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.LeftParen]], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - AtLeastN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - AtMostN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.LeftParen]], - ] - ], - ] = DoNotCare() - rpar: Union[ - Sequence[ - Union[ - RightParenMatchType, - DoNotCareSentinel, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - AtLeastN[ - Union[ - RightParenMatchType, - DoNotCareSentinel, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - AtMostN[ - Union[ - RightParenMatchType, - DoNotCareSentinel, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - ] - ], - DoNotCareSentinel, - MatchIfTrue[Sequence[cst.RightParen]], - OneOf[ - Union[ - Sequence[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - AtLeastN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - AtMostN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.RightParen]], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - AtLeastN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - AtMostN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.RightParen]], - ] - ], - ] = DoNotCare() - whitespace_before_if: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - whitespace_after_if: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - whitespace_before_else: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - whitespace_after_else: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class Imaginary(BaseExpression, BaseNumber, BaseMatcherNode): - value: Union[ - strMatchType, DoNotCareSentinel, OneOf[strMatchType], AllOf[strMatchType] - ] = DoNotCare() - lpar: Union[ - Sequence[ - Union[ - LeftParenMatchType, - DoNotCareSentinel, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - AtLeastN[ - Union[ - LeftParenMatchType, - DoNotCareSentinel, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - AtMostN[ - Union[ - LeftParenMatchType, - DoNotCareSentinel, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - ] - ], - DoNotCareSentinel, - MatchIfTrue[Sequence[cst.LeftParen]], - OneOf[ - Union[ - Sequence[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - AtLeastN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - AtMostN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.LeftParen]], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - AtLeastN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - AtMostN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.LeftParen]], - ] - ], - ] = DoNotCare() - rpar: Union[ - Sequence[ - Union[ - RightParenMatchType, - DoNotCareSentinel, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - AtLeastN[ - Union[ - RightParenMatchType, - DoNotCareSentinel, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - AtMostN[ - Union[ - RightParenMatchType, - DoNotCareSentinel, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - ] - ], - DoNotCareSentinel, - MatchIfTrue[Sequence[cst.RightParen]], - OneOf[ - Union[ - Sequence[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - AtLeastN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - AtMostN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.RightParen]], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - AtLeastN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - AtMostN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.RightParen]], - ] - ], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -ImportAliasMatchType = Union[ - "ImportAlias", MetadataMatchType, MatchIfTrue[cst.ImportAlias] -] - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class Import(BaseSmallStatement, BaseMatcherNode): - names: Union[ - Sequence[ - Union[ - ImportAliasMatchType, - DoNotCareSentinel, - OneOf[ImportAliasMatchType], - AllOf[ImportAliasMatchType], - AtLeastN[ - Union[ - ImportAliasMatchType, - DoNotCareSentinel, - OneOf[ImportAliasMatchType], - AllOf[ImportAliasMatchType], - ] - ], - AtMostN[ - Union[ - ImportAliasMatchType, - DoNotCareSentinel, - OneOf[ImportAliasMatchType], - AllOf[ImportAliasMatchType], - ] - ], - ] - ], - DoNotCareSentinel, - MatchIfTrue[Sequence[cst.ImportAlias]], - OneOf[ - Union[ - Sequence[ - Union[ - ImportAliasMatchType, - OneOf[ImportAliasMatchType], - AllOf[ImportAliasMatchType], - AtLeastN[ - Union[ - ImportAliasMatchType, - OneOf[ImportAliasMatchType], - AllOf[ImportAliasMatchType], - ] - ], - AtMostN[ - Union[ - ImportAliasMatchType, - OneOf[ImportAliasMatchType], - AllOf[ImportAliasMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.ImportAlias]], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - ImportAliasMatchType, - OneOf[ImportAliasMatchType], - AllOf[ImportAliasMatchType], - AtLeastN[ - Union[ - ImportAliasMatchType, - OneOf[ImportAliasMatchType], - AllOf[ImportAliasMatchType], - ] - ], - AtMostN[ - Union[ - ImportAliasMatchType, - OneOf[ImportAliasMatchType], - AllOf[ImportAliasMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.ImportAlias]], - ] - ], - ] = DoNotCare() - semicolon: Union[ - SemicolonMatchType, - DoNotCareSentinel, - OneOf[SemicolonMatchType], - AllOf[SemicolonMatchType], - ] = DoNotCare() - whitespace_after_import: Union[ - SimpleWhitespaceMatchType, - DoNotCareSentinel, - OneOf[SimpleWhitespaceMatchType], - AllOf[SimpleWhitespaceMatchType], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -AttributeOrNameMatchType = Union[ - "Attribute", "Name", MetadataMatchType, MatchIfTrue[Union[cst.Attribute, cst.Name]] -] - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class ImportAlias(BaseMatcherNode): - name: Union[ - AttributeOrNameMatchType, - DoNotCareSentinel, - OneOf[AttributeOrNameMatchType], - AllOf[AttributeOrNameMatchType], - ] = DoNotCare() - asname: Union[ - Optional["AsName"], - MetadataMatchType, - MatchIfTrue[Optional[cst.AsName]], - DoNotCareSentinel, - OneOf[ - Union[ - Optional["AsName"], MetadataMatchType, MatchIfTrue[Optional[cst.AsName]] - ] - ], - AllOf[ - Union[ - Optional["AsName"], MetadataMatchType, MatchIfTrue[Optional[cst.AsName]] - ] - ], - ] = DoNotCare() - comma: Union[ - CommaMatchType, DoNotCareSentinel, OneOf[CommaMatchType], AllOf[CommaMatchType] - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -AttributeOrNameOrNoneMatchType = Union[ - "Attribute", - "Name", - None, - MetadataMatchType, - MatchIfTrue[Union[cst.Attribute, cst.Name, None]], -] - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class ImportFrom(BaseSmallStatement, BaseMatcherNode): - module: Union[ - AttributeOrNameOrNoneMatchType, - DoNotCareSentinel, - OneOf[AttributeOrNameOrNoneMatchType], - AllOf[AttributeOrNameOrNoneMatchType], - ] = DoNotCare() - names: Union[ - Union[ - Sequence[ - Union[ - ImportAliasMatchType, - DoNotCareSentinel, - OneOf[ImportAliasMatchType], - AllOf[ImportAliasMatchType], - AtLeastN[ - Union[ - ImportAliasMatchType, - DoNotCareSentinel, - OneOf[ImportAliasMatchType], - AllOf[ImportAliasMatchType], - ] - ], - AtMostN[ - Union[ - ImportAliasMatchType, - DoNotCareSentinel, - OneOf[ImportAliasMatchType], - AllOf[ImportAliasMatchType], - ] - ], - ] - ], - DoNotCareSentinel, - MatchIfTrue[Sequence[cst.ImportAlias]], - OneOf[ - Union[ - Sequence[ - Union[ - ImportAliasMatchType, - OneOf[ImportAliasMatchType], - AllOf[ImportAliasMatchType], - AtLeastN[ - Union[ - ImportAliasMatchType, - OneOf[ImportAliasMatchType], - AllOf[ImportAliasMatchType], - ] - ], - AtMostN[ - Union[ - ImportAliasMatchType, - OneOf[ImportAliasMatchType], - AllOf[ImportAliasMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.ImportAlias]], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - ImportAliasMatchType, - OneOf[ImportAliasMatchType], - AllOf[ImportAliasMatchType], - AtLeastN[ - Union[ - ImportAliasMatchType, - OneOf[ImportAliasMatchType], - AllOf[ImportAliasMatchType], - ] - ], - AtMostN[ - Union[ - ImportAliasMatchType, - OneOf[ImportAliasMatchType], - AllOf[ImportAliasMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.ImportAlias]], - ] - ], - ], - "ImportStar", - MetadataMatchType, - MatchIfTrue[ - Union[ - Sequence[cst.ImportAlias], - cst.ImportStar, - OneOf[Union[Sequence[cst.ImportAlias], cst.ImportStar]], - AllOf[Union[Sequence[cst.ImportAlias], cst.ImportStar]], - ] - ], - DoNotCareSentinel, - OneOf[ - Union[ - Union[ - Sequence[ - Union[ - ImportAliasMatchType, - OneOf[ImportAliasMatchType], - AllOf[ImportAliasMatchType], - AtLeastN[ - Union[ - ImportAliasMatchType, - OneOf[ImportAliasMatchType], - AllOf[ImportAliasMatchType], - ] - ], - AtMostN[ - Union[ - ImportAliasMatchType, - OneOf[ImportAliasMatchType], - AllOf[ImportAliasMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.ImportAlias]], - OneOf[ - Union[ - Sequence[ - Union[ - ImportAliasMatchType, - OneOf[ImportAliasMatchType], - AllOf[ImportAliasMatchType], - AtLeastN[ - Union[ - ImportAliasMatchType, - OneOf[ImportAliasMatchType], - AllOf[ImportAliasMatchType], - ] - ], - AtMostN[ - Union[ - ImportAliasMatchType, - OneOf[ImportAliasMatchType], - AllOf[ImportAliasMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.ImportAlias]], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - ImportAliasMatchType, - OneOf[ImportAliasMatchType], - AllOf[ImportAliasMatchType], - AtLeastN[ - Union[ - ImportAliasMatchType, - OneOf[ImportAliasMatchType], - AllOf[ImportAliasMatchType], - ] - ], - AtMostN[ - Union[ - ImportAliasMatchType, - OneOf[ImportAliasMatchType], - AllOf[ImportAliasMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.ImportAlias]], - ] - ], - ], - "ImportStar", - MetadataMatchType, - MatchIfTrue[ - Union[ - Sequence[cst.ImportAlias], - cst.ImportStar, - OneOf[Union[Sequence[cst.ImportAlias], cst.ImportStar]], - AllOf[Union[Sequence[cst.ImportAlias], cst.ImportStar]], - ] - ], - ] - ], - AllOf[ - Union[ - Union[ - Sequence[ - Union[ - ImportAliasMatchType, - OneOf[ImportAliasMatchType], - AllOf[ImportAliasMatchType], - AtLeastN[ - Union[ - ImportAliasMatchType, - OneOf[ImportAliasMatchType], - AllOf[ImportAliasMatchType], - ] - ], - AtMostN[ - Union[ - ImportAliasMatchType, - OneOf[ImportAliasMatchType], - AllOf[ImportAliasMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.ImportAlias]], - OneOf[ - Union[ - Sequence[ - Union[ - ImportAliasMatchType, - OneOf[ImportAliasMatchType], - AllOf[ImportAliasMatchType], - AtLeastN[ - Union[ - ImportAliasMatchType, - OneOf[ImportAliasMatchType], - AllOf[ImportAliasMatchType], - ] - ], - AtMostN[ - Union[ - ImportAliasMatchType, - OneOf[ImportAliasMatchType], - AllOf[ImportAliasMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.ImportAlias]], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - ImportAliasMatchType, - OneOf[ImportAliasMatchType], - AllOf[ImportAliasMatchType], - AtLeastN[ - Union[ - ImportAliasMatchType, - OneOf[ImportAliasMatchType], - AllOf[ImportAliasMatchType], - ] - ], - AtMostN[ - Union[ - ImportAliasMatchType, - OneOf[ImportAliasMatchType], - AllOf[ImportAliasMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.ImportAlias]], - ] - ], - ], - "ImportStar", - MetadataMatchType, - MatchIfTrue[ - Union[ - Sequence[cst.ImportAlias], - cst.ImportStar, - OneOf[Union[Sequence[cst.ImportAlias], cst.ImportStar]], - AllOf[Union[Sequence[cst.ImportAlias], cst.ImportStar]], - ] - ], - ] - ], - ] = DoNotCare() - relative: Union[ - Sequence[ - Union[ - DotMatchType, - DoNotCareSentinel, - OneOf[DotMatchType], - AllOf[DotMatchType], - AtLeastN[ - Union[ - DotMatchType, - DoNotCareSentinel, - OneOf[DotMatchType], - AllOf[DotMatchType], - ] - ], - AtMostN[ - Union[ - DotMatchType, - DoNotCareSentinel, - OneOf[DotMatchType], - AllOf[DotMatchType], - ] - ], - ] - ], - DoNotCareSentinel, - MatchIfTrue[Sequence[cst.Dot]], - OneOf[ - Union[ - Sequence[ - Union[ - DotMatchType, - OneOf[DotMatchType], - AllOf[DotMatchType], - AtLeastN[ - Union[ - DotMatchType, OneOf[DotMatchType], AllOf[DotMatchType] - ] - ], - AtMostN[ - Union[ - DotMatchType, OneOf[DotMatchType], AllOf[DotMatchType] - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.Dot]], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - DotMatchType, - OneOf[DotMatchType], - AllOf[DotMatchType], - AtLeastN[ - Union[ - DotMatchType, OneOf[DotMatchType], AllOf[DotMatchType] - ] - ], - AtMostN[ - Union[ - DotMatchType, OneOf[DotMatchType], AllOf[DotMatchType] - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.Dot]], - ] - ], - ] = DoNotCare() - lpar: Union[ - Optional["LeftParen"], - MetadataMatchType, - MatchIfTrue[Optional[cst.LeftParen]], - DoNotCareSentinel, - OneOf[ - Union[ - Optional["LeftParen"], - MetadataMatchType, - MatchIfTrue[Optional[cst.LeftParen]], - ] - ], - AllOf[ - Union[ - Optional["LeftParen"], - MetadataMatchType, - MatchIfTrue[Optional[cst.LeftParen]], - ] - ], - ] = DoNotCare() - rpar: Union[ - Optional["RightParen"], - MetadataMatchType, - MatchIfTrue[Optional[cst.RightParen]], - DoNotCareSentinel, - OneOf[ - Union[ - Optional["RightParen"], - MetadataMatchType, - MatchIfTrue[Optional[cst.RightParen]], - ] - ], - AllOf[ - Union[ - Optional["RightParen"], - MetadataMatchType, - MatchIfTrue[Optional[cst.RightParen]], - ] - ], - ] = DoNotCare() - semicolon: Union[ - SemicolonMatchType, - DoNotCareSentinel, - OneOf[SemicolonMatchType], - AllOf[SemicolonMatchType], - ] = DoNotCare() - whitespace_after_from: Union[ - SimpleWhitespaceMatchType, - DoNotCareSentinel, - OneOf[SimpleWhitespaceMatchType], - AllOf[SimpleWhitespaceMatchType], - ] = DoNotCare() - whitespace_before_import: Union[ - SimpleWhitespaceMatchType, - DoNotCareSentinel, - OneOf[SimpleWhitespaceMatchType], - AllOf[SimpleWhitespaceMatchType], - ] = DoNotCare() - whitespace_after_import: Union[ - SimpleWhitespaceMatchType, - DoNotCareSentinel, - OneOf[SimpleWhitespaceMatchType], - AllOf[SimpleWhitespaceMatchType], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class ImportStar(BaseMatcherNode): - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class In(BaseCompOp, BaseMatcherNode): - whitespace_before: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - whitespace_after: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -BaseStatementMatchType = Union[ - "BaseStatement", MetadataMatchType, MatchIfTrue[cst.BaseStatement] -] - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class IndentedBlock(BaseSuite, BaseMatcherNode): - body: Union[ - Sequence[ - Union[ - BaseStatementMatchType, - DoNotCareSentinel, - OneOf[BaseStatementMatchType], - AllOf[BaseStatementMatchType], - AtLeastN[ - Union[ - BaseStatementMatchType, - DoNotCareSentinel, - OneOf[BaseStatementMatchType], - AllOf[BaseStatementMatchType], - ] - ], - AtMostN[ - Union[ - BaseStatementMatchType, - DoNotCareSentinel, - OneOf[BaseStatementMatchType], - AllOf[BaseStatementMatchType], - ] - ], - ] - ], - DoNotCareSentinel, - MatchIfTrue[Sequence[cst.BaseStatement]], - OneOf[ - Union[ - Sequence[ - Union[ - BaseStatementMatchType, - OneOf[BaseStatementMatchType], - AllOf[BaseStatementMatchType], - AtLeastN[ - Union[ - BaseStatementMatchType, - OneOf[BaseStatementMatchType], - AllOf[BaseStatementMatchType], - ] - ], - AtMostN[ - Union[ - BaseStatementMatchType, - OneOf[BaseStatementMatchType], - AllOf[BaseStatementMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.BaseStatement]], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - BaseStatementMatchType, - OneOf[BaseStatementMatchType], - AllOf[BaseStatementMatchType], - AtLeastN[ - Union[ - BaseStatementMatchType, - OneOf[BaseStatementMatchType], - AllOf[BaseStatementMatchType], - ] - ], - AtMostN[ - Union[ - BaseStatementMatchType, - OneOf[BaseStatementMatchType], - AllOf[BaseStatementMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.BaseStatement]], - ] - ], - ] = DoNotCare() - header: Union[ - TrailingWhitespaceMatchType, - DoNotCareSentinel, - OneOf[TrailingWhitespaceMatchType], - AllOf[TrailingWhitespaceMatchType], - ] = DoNotCare() - indent: Union[ - Optional[str], - MetadataMatchType, - MatchIfTrue[Optional[str]], - DoNotCareSentinel, - OneOf[Union[Optional[str], MetadataMatchType, MatchIfTrue[Optional[str]]]], - AllOf[Union[Optional[str], MetadataMatchType, MatchIfTrue[Optional[str]]]], - ] = DoNotCare() - footer: Union[ - Sequence[ - Union[ - EmptyLineMatchType, - DoNotCareSentinel, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - AtLeastN[ - Union[ - EmptyLineMatchType, - DoNotCareSentinel, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - AtMostN[ - Union[ - EmptyLineMatchType, - DoNotCareSentinel, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - ] - ], - DoNotCareSentinel, - MatchIfTrue[Sequence[cst.EmptyLine]], - OneOf[ - Union[ - Sequence[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - AtLeastN[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - AtMostN[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.EmptyLine]], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - AtLeastN[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - AtMostN[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.EmptyLine]], - ] - ], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class Index(BaseSlice, BaseMatcherNode): - value: Union[ - BaseExpressionMatchType, - DoNotCareSentinel, - OneOf[BaseExpressionMatchType], - AllOf[BaseExpressionMatchType], - ] = DoNotCare() - star: Union[ - Optional[Literal["*"]], - MetadataMatchType, - MatchIfTrue[Optional[Literal["*"]]], - DoNotCareSentinel, - OneOf[ - Union[ - Optional[Literal["*"]], - MetadataMatchType, - MatchIfTrue[Optional[Literal["*"]]], - ] - ], - AllOf[ - Union[ - Optional[Literal["*"]], - MetadataMatchType, - MatchIfTrue[Optional[Literal["*"]]], - ] - ], - ] = DoNotCare() - whitespace_after_star: Union[ - Optional["BaseParenthesizableWhitespace"], - MetadataMatchType, - MatchIfTrue[Optional[cst.BaseParenthesizableWhitespace]], - DoNotCareSentinel, - OneOf[ - Union[ - Optional["BaseParenthesizableWhitespace"], - MetadataMatchType, - MatchIfTrue[Optional[cst.BaseParenthesizableWhitespace]], - ] - ], - AllOf[ - Union[ - Optional["BaseParenthesizableWhitespace"], - MetadataMatchType, - MatchIfTrue[Optional[cst.BaseParenthesizableWhitespace]], - ] - ], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class Integer(BaseExpression, BaseNumber, BaseMatcherNode): - value: Union[ - strMatchType, DoNotCareSentinel, OneOf[strMatchType], AllOf[strMatchType] - ] = DoNotCare() - lpar: Union[ - Sequence[ - Union[ - LeftParenMatchType, - DoNotCareSentinel, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - AtLeastN[ - Union[ - LeftParenMatchType, - DoNotCareSentinel, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - AtMostN[ - Union[ - LeftParenMatchType, - DoNotCareSentinel, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - ] - ], - DoNotCareSentinel, - MatchIfTrue[Sequence[cst.LeftParen]], - OneOf[ - Union[ - Sequence[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - AtLeastN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - AtMostN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.LeftParen]], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - AtLeastN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - AtMostN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.LeftParen]], - ] - ], - ] = DoNotCare() - rpar: Union[ - Sequence[ - Union[ - RightParenMatchType, - DoNotCareSentinel, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - AtLeastN[ - Union[ - RightParenMatchType, - DoNotCareSentinel, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - AtMostN[ - Union[ - RightParenMatchType, - DoNotCareSentinel, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - ] - ], - DoNotCareSentinel, - MatchIfTrue[Sequence[cst.RightParen]], - OneOf[ - Union[ - Sequence[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - AtLeastN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - AtMostN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.RightParen]], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - AtLeastN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - AtMostN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.RightParen]], - ] - ], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class Is(BaseCompOp, BaseMatcherNode): - whitespace_before: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - whitespace_after: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class IsNot(BaseCompOp, BaseMatcherNode): - whitespace_before: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - whitespace_between: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - whitespace_after: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -ColonMatchType = Union["Colon", MetadataMatchType, MatchIfTrue[cst.Colon]] - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class Lambda(BaseExpression, BaseMatcherNode): - params: Union[ - ParametersMatchType, - DoNotCareSentinel, - OneOf[ParametersMatchType], - AllOf[ParametersMatchType], - ] = DoNotCare() - body: Union[ - BaseExpressionMatchType, - DoNotCareSentinel, - OneOf[BaseExpressionMatchType], - AllOf[BaseExpressionMatchType], - ] = DoNotCare() - colon: Union[ - ColonMatchType, DoNotCareSentinel, OneOf[ColonMatchType], AllOf[ColonMatchType] - ] = DoNotCare() - lpar: Union[ - Sequence[ - Union[ - LeftParenMatchType, - DoNotCareSentinel, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - AtLeastN[ - Union[ - LeftParenMatchType, - DoNotCareSentinel, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - AtMostN[ - Union[ - LeftParenMatchType, - DoNotCareSentinel, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - ] - ], - DoNotCareSentinel, - MatchIfTrue[Sequence[cst.LeftParen]], - OneOf[ - Union[ - Sequence[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - AtLeastN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - AtMostN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.LeftParen]], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - AtLeastN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - AtMostN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.LeftParen]], - ] - ], - ] = DoNotCare() - rpar: Union[ - Sequence[ - Union[ - RightParenMatchType, - DoNotCareSentinel, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - AtLeastN[ - Union[ - RightParenMatchType, - DoNotCareSentinel, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - AtMostN[ - Union[ - RightParenMatchType, - DoNotCareSentinel, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - ] - ], - DoNotCareSentinel, - MatchIfTrue[Sequence[cst.RightParen]], - OneOf[ - Union[ - Sequence[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - AtLeastN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - AtMostN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.RightParen]], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - AtLeastN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - AtMostN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.RightParen]], - ] - ], - ] = DoNotCare() - whitespace_after_lambda: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class LeftCurlyBrace(BaseMatcherNode): - whitespace_after: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class LeftParen(BaseMatcherNode): - whitespace_after: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class LeftShift(BaseBinaryOp, BaseMatcherNode): - whitespace_before: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - whitespace_after: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class LeftShiftAssign(BaseAugOp, BaseMatcherNode): - whitespace_before: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - whitespace_after: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class LeftSquareBracket(BaseMatcherNode): - whitespace_after: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class LessThan(BaseCompOp, BaseMatcherNode): - whitespace_before: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - whitespace_after: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class LessThanEqual(BaseCompOp, BaseMatcherNode): - whitespace_before: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - whitespace_after: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -BaseElementMatchType = Union[ - "BaseElement", MetadataMatchType, MatchIfTrue[cst.BaseElement] -] -LeftSquareBracketMatchType = Union[ - "LeftSquareBracket", MetadataMatchType, MatchIfTrue[cst.LeftSquareBracket] -] -RightSquareBracketMatchType = Union[ - "RightSquareBracket", MetadataMatchType, MatchIfTrue[cst.RightSquareBracket] -] - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class List( - BaseAssignTargetExpression, - BaseDelTargetExpression, - BaseExpression, - BaseList, - BaseMatcherNode, -): - elements: Union[ - Sequence[ - Union[ - BaseElementMatchType, - DoNotCareSentinel, - OneOf[BaseElementMatchType], - AllOf[BaseElementMatchType], - AtLeastN[ - Union[ - BaseElementMatchType, - DoNotCareSentinel, - OneOf[BaseElementMatchType], - AllOf[BaseElementMatchType], - ] - ], - AtMostN[ - Union[ - BaseElementMatchType, - DoNotCareSentinel, - OneOf[BaseElementMatchType], - AllOf[BaseElementMatchType], - ] - ], - ] - ], - DoNotCareSentinel, - MatchIfTrue[Sequence[cst.BaseElement]], - OneOf[ - Union[ - Sequence[ - Union[ - BaseElementMatchType, - OneOf[BaseElementMatchType], - AllOf[BaseElementMatchType], - AtLeastN[ - Union[ - BaseElementMatchType, - OneOf[BaseElementMatchType], - AllOf[BaseElementMatchType], - ] - ], - AtMostN[ - Union[ - BaseElementMatchType, - OneOf[BaseElementMatchType], - AllOf[BaseElementMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.BaseElement]], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - BaseElementMatchType, - OneOf[BaseElementMatchType], - AllOf[BaseElementMatchType], - AtLeastN[ - Union[ - BaseElementMatchType, - OneOf[BaseElementMatchType], - AllOf[BaseElementMatchType], - ] - ], - AtMostN[ - Union[ - BaseElementMatchType, - OneOf[BaseElementMatchType], - AllOf[BaseElementMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.BaseElement]], - ] - ], - ] = DoNotCare() - lbracket: Union[ - LeftSquareBracketMatchType, - DoNotCareSentinel, - OneOf[LeftSquareBracketMatchType], - AllOf[LeftSquareBracketMatchType], - ] = DoNotCare() - rbracket: Union[ - RightSquareBracketMatchType, - DoNotCareSentinel, - OneOf[RightSquareBracketMatchType], - AllOf[RightSquareBracketMatchType], - ] = DoNotCare() - lpar: Union[ - Sequence[ - Union[ - LeftParenMatchType, - DoNotCareSentinel, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - AtLeastN[ - Union[ - LeftParenMatchType, - DoNotCareSentinel, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - AtMostN[ - Union[ - LeftParenMatchType, - DoNotCareSentinel, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - ] - ], - DoNotCareSentinel, - MatchIfTrue[Sequence[cst.LeftParen]], - OneOf[ - Union[ - Sequence[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - AtLeastN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - AtMostN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.LeftParen]], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - AtLeastN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - AtMostN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.LeftParen]], - ] - ], - ] = DoNotCare() - rpar: Union[ - Sequence[ - Union[ - RightParenMatchType, - DoNotCareSentinel, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - AtLeastN[ - Union[ - RightParenMatchType, - DoNotCareSentinel, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - AtMostN[ - Union[ - RightParenMatchType, - DoNotCareSentinel, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - ] - ], - DoNotCareSentinel, - MatchIfTrue[Sequence[cst.RightParen]], - OneOf[ - Union[ - Sequence[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - AtLeastN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - AtMostN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.RightParen]], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - AtLeastN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - AtMostN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.RightParen]], - ] - ], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class ListComp(BaseComp, BaseExpression, BaseList, BaseSimpleComp, BaseMatcherNode): - elt: Union[ - BaseExpressionMatchType, - DoNotCareSentinel, - OneOf[BaseExpressionMatchType], - AllOf[BaseExpressionMatchType], - ] = DoNotCare() - for_in: Union[ - CompForMatchType, - DoNotCareSentinel, - OneOf[CompForMatchType], - AllOf[CompForMatchType], - ] = DoNotCare() - lbracket: Union[ - LeftSquareBracketMatchType, - DoNotCareSentinel, - OneOf[LeftSquareBracketMatchType], - AllOf[LeftSquareBracketMatchType], - ] = DoNotCare() - rbracket: Union[ - RightSquareBracketMatchType, - DoNotCareSentinel, - OneOf[RightSquareBracketMatchType], - AllOf[RightSquareBracketMatchType], - ] = DoNotCare() - lpar: Union[ - Sequence[ - Union[ - LeftParenMatchType, - DoNotCareSentinel, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - AtLeastN[ - Union[ - LeftParenMatchType, - DoNotCareSentinel, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - AtMostN[ - Union[ - LeftParenMatchType, - DoNotCareSentinel, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - ] - ], - DoNotCareSentinel, - MatchIfTrue[Sequence[cst.LeftParen]], - OneOf[ - Union[ - Sequence[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - AtLeastN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - AtMostN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.LeftParen]], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - AtLeastN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - AtMostN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.LeftParen]], - ] - ], - ] = DoNotCare() - rpar: Union[ - Sequence[ - Union[ - RightParenMatchType, - DoNotCareSentinel, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - AtLeastN[ - Union[ - RightParenMatchType, - DoNotCareSentinel, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - AtMostN[ - Union[ - RightParenMatchType, - DoNotCareSentinel, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - ] - ], - DoNotCareSentinel, - MatchIfTrue[Sequence[cst.RightParen]], - OneOf[ - Union[ - Sequence[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - AtLeastN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - AtMostN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.RightParen]], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - AtLeastN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - AtMostN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.RightParen]], - ] - ], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -MatchCaseMatchType = Union["MatchCase", MetadataMatchType, MatchIfTrue[cst.MatchCase]] - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class Match(BaseCompoundStatement, BaseStatement, BaseMatcherNode): - subject: Union[ - BaseExpressionMatchType, - DoNotCareSentinel, - OneOf[BaseExpressionMatchType], - AllOf[BaseExpressionMatchType], - ] = DoNotCare() - cases: Union[ - Sequence[ - Union[ - MatchCaseMatchType, - DoNotCareSentinel, - OneOf[MatchCaseMatchType], - AllOf[MatchCaseMatchType], - AtLeastN[ - Union[ - MatchCaseMatchType, - DoNotCareSentinel, - OneOf[MatchCaseMatchType], - AllOf[MatchCaseMatchType], - ] - ], - AtMostN[ - Union[ - MatchCaseMatchType, - DoNotCareSentinel, - OneOf[MatchCaseMatchType], - AllOf[MatchCaseMatchType], - ] - ], - ] - ], - DoNotCareSentinel, - MatchIfTrue[Sequence[cst.MatchCase]], - OneOf[ - Union[ - Sequence[ - Union[ - MatchCaseMatchType, - OneOf[MatchCaseMatchType], - AllOf[MatchCaseMatchType], - AtLeastN[ - Union[ - MatchCaseMatchType, - OneOf[MatchCaseMatchType], - AllOf[MatchCaseMatchType], - ] - ], - AtMostN[ - Union[ - MatchCaseMatchType, - OneOf[MatchCaseMatchType], - AllOf[MatchCaseMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.MatchCase]], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - MatchCaseMatchType, - OneOf[MatchCaseMatchType], - AllOf[MatchCaseMatchType], - AtLeastN[ - Union[ - MatchCaseMatchType, - OneOf[MatchCaseMatchType], - AllOf[MatchCaseMatchType], - ] - ], - AtMostN[ - Union[ - MatchCaseMatchType, - OneOf[MatchCaseMatchType], - AllOf[MatchCaseMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.MatchCase]], - ] - ], - ] = DoNotCare() - leading_lines: Union[ - Sequence[ - Union[ - EmptyLineMatchType, - DoNotCareSentinel, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - AtLeastN[ - Union[ - EmptyLineMatchType, - DoNotCareSentinel, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - AtMostN[ - Union[ - EmptyLineMatchType, - DoNotCareSentinel, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - ] - ], - DoNotCareSentinel, - MatchIfTrue[Sequence[cst.EmptyLine]], - OneOf[ - Union[ - Sequence[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - AtLeastN[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - AtMostN[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.EmptyLine]], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - AtLeastN[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - AtMostN[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.EmptyLine]], - ] - ], - ] = DoNotCare() - whitespace_after_match: Union[ - SimpleWhitespaceMatchType, - DoNotCareSentinel, - OneOf[SimpleWhitespaceMatchType], - AllOf[SimpleWhitespaceMatchType], - ] = DoNotCare() - whitespace_before_colon: Union[ - SimpleWhitespaceMatchType, - DoNotCareSentinel, - OneOf[SimpleWhitespaceMatchType], - AllOf[SimpleWhitespaceMatchType], - ] = DoNotCare() - whitespace_after_colon: Union[ - TrailingWhitespaceMatchType, - DoNotCareSentinel, - OneOf[TrailingWhitespaceMatchType], - AllOf[TrailingWhitespaceMatchType], - ] = DoNotCare() - indent: Union[ - Optional[str], - MetadataMatchType, - MatchIfTrue[Optional[str]], - DoNotCareSentinel, - OneOf[Union[Optional[str], MetadataMatchType, MatchIfTrue[Optional[str]]]], - AllOf[Union[Optional[str], MetadataMatchType, MatchIfTrue[Optional[str]]]], - ] = DoNotCare() - footer: Union[ - Sequence[ - Union[ - EmptyLineMatchType, - DoNotCareSentinel, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - AtLeastN[ - Union[ - EmptyLineMatchType, - DoNotCareSentinel, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - AtMostN[ - Union[ - EmptyLineMatchType, - DoNotCareSentinel, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - ] - ], - DoNotCareSentinel, - MatchIfTrue[Sequence[cst.EmptyLine]], - OneOf[ - Union[ - Sequence[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - AtLeastN[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - AtMostN[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.EmptyLine]], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - AtLeastN[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - AtMostN[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.EmptyLine]], - ] - ], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class MatchAs(BaseMatcherNode): - pattern: Union[ - Optional["MatchPattern"], - MetadataMatchType, - MatchIfTrue[Optional[cst.MatchPattern]], - DoNotCareSentinel, - OneOf[ - Union[ - Optional["MatchPattern"], - MetadataMatchType, - MatchIfTrue[Optional[cst.MatchPattern]], - ] - ], - AllOf[ - Union[ - Optional["MatchPattern"], - MetadataMatchType, - MatchIfTrue[Optional[cst.MatchPattern]], - ] - ], - ] = DoNotCare() - name: Union[ - Optional["Name"], - MetadataMatchType, - MatchIfTrue[Optional[cst.Name]], - DoNotCareSentinel, - OneOf[ - Union[Optional["Name"], MetadataMatchType, MatchIfTrue[Optional[cst.Name]]] - ], - AllOf[ - Union[Optional["Name"], MetadataMatchType, MatchIfTrue[Optional[cst.Name]]] - ], - ] = DoNotCare() - whitespace_before_as: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - whitespace_after_as: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - lpar: Union[ - Sequence[ - Union[ - LeftParenMatchType, - DoNotCareSentinel, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - AtLeastN[ - Union[ - LeftParenMatchType, - DoNotCareSentinel, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - AtMostN[ - Union[ - LeftParenMatchType, - DoNotCareSentinel, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - ] - ], - DoNotCareSentinel, - MatchIfTrue[Sequence[cst.LeftParen]], - OneOf[ - Union[ - Sequence[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - AtLeastN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - AtMostN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.LeftParen]], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - AtLeastN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - AtMostN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.LeftParen]], - ] - ], - ] = DoNotCare() - rpar: Union[ - Sequence[ - Union[ - RightParenMatchType, - DoNotCareSentinel, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - AtLeastN[ - Union[ - RightParenMatchType, - DoNotCareSentinel, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - AtMostN[ - Union[ - RightParenMatchType, - DoNotCareSentinel, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - ] - ], - DoNotCareSentinel, - MatchIfTrue[Sequence[cst.RightParen]], - OneOf[ - Union[ - Sequence[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - AtLeastN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - AtMostN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.RightParen]], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - AtLeastN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - AtMostN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.RightParen]], - ] - ], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -MatchPatternMatchType = Union[ - "MatchPattern", MetadataMatchType, MatchIfTrue[cst.MatchPattern] -] - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class MatchCase(BaseMatcherNode): - pattern: Union[ - MatchPatternMatchType, - DoNotCareSentinel, - OneOf[MatchPatternMatchType], - AllOf[MatchPatternMatchType], - ] = DoNotCare() - body: Union[ - BaseSuiteMatchType, - DoNotCareSentinel, - OneOf[BaseSuiteMatchType], - AllOf[BaseSuiteMatchType], - ] = DoNotCare() - guard: Union[ - Optional["BaseExpression"], - MetadataMatchType, - MatchIfTrue[Optional[cst.BaseExpression]], - DoNotCareSentinel, - OneOf[ - Union[ - Optional["BaseExpression"], - MetadataMatchType, - MatchIfTrue[Optional[cst.BaseExpression]], - ] - ], - AllOf[ - Union[ - Optional["BaseExpression"], - MetadataMatchType, - MatchIfTrue[Optional[cst.BaseExpression]], - ] - ], - ] = DoNotCare() - leading_lines: Union[ - Sequence[ - Union[ - EmptyLineMatchType, - DoNotCareSentinel, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - AtLeastN[ - Union[ - EmptyLineMatchType, - DoNotCareSentinel, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - AtMostN[ - Union[ - EmptyLineMatchType, - DoNotCareSentinel, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - ] - ], - DoNotCareSentinel, - MatchIfTrue[Sequence[cst.EmptyLine]], - OneOf[ - Union[ - Sequence[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - AtLeastN[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - AtMostN[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.EmptyLine]], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - AtLeastN[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - AtMostN[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.EmptyLine]], - ] - ], - ] = DoNotCare() - whitespace_after_case: Union[ - SimpleWhitespaceMatchType, - DoNotCareSentinel, - OneOf[SimpleWhitespaceMatchType], - AllOf[SimpleWhitespaceMatchType], - ] = DoNotCare() - whitespace_before_if: Union[ - SimpleWhitespaceMatchType, - DoNotCareSentinel, - OneOf[SimpleWhitespaceMatchType], - AllOf[SimpleWhitespaceMatchType], - ] = DoNotCare() - whitespace_after_if: Union[ - SimpleWhitespaceMatchType, - DoNotCareSentinel, - OneOf[SimpleWhitespaceMatchType], - AllOf[SimpleWhitespaceMatchType], - ] = DoNotCare() - whitespace_before_colon: Union[ - SimpleWhitespaceMatchType, - DoNotCareSentinel, - OneOf[SimpleWhitespaceMatchType], - AllOf[SimpleWhitespaceMatchType], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -MatchSequenceElementMatchType = Union[ - "MatchSequenceElement", MetadataMatchType, MatchIfTrue[cst.MatchSequenceElement] -] -MatchKeywordElementMatchType = Union[ - "MatchKeywordElement", MetadataMatchType, MatchIfTrue[cst.MatchKeywordElement] -] - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class MatchClass(BaseMatcherNode): - cls: Union[ - BaseExpressionMatchType, - DoNotCareSentinel, - OneOf[BaseExpressionMatchType], - AllOf[BaseExpressionMatchType], - ] = DoNotCare() - patterns: Union[ - Sequence[ - Union[ - MatchSequenceElementMatchType, - DoNotCareSentinel, - OneOf[MatchSequenceElementMatchType], - AllOf[MatchSequenceElementMatchType], - AtLeastN[ - Union[ - MatchSequenceElementMatchType, - DoNotCareSentinel, - OneOf[MatchSequenceElementMatchType], - AllOf[MatchSequenceElementMatchType], - ] - ], - AtMostN[ - Union[ - MatchSequenceElementMatchType, - DoNotCareSentinel, - OneOf[MatchSequenceElementMatchType], - AllOf[MatchSequenceElementMatchType], - ] - ], - ] - ], - DoNotCareSentinel, - MatchIfTrue[Sequence[cst.MatchSequenceElement]], - OneOf[ - Union[ - Sequence[ - Union[ - MatchSequenceElementMatchType, - OneOf[MatchSequenceElementMatchType], - AllOf[MatchSequenceElementMatchType], - AtLeastN[ - Union[ - MatchSequenceElementMatchType, - OneOf[MatchSequenceElementMatchType], - AllOf[MatchSequenceElementMatchType], - ] - ], - AtMostN[ - Union[ - MatchSequenceElementMatchType, - OneOf[MatchSequenceElementMatchType], - AllOf[MatchSequenceElementMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.MatchSequenceElement]], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - MatchSequenceElementMatchType, - OneOf[MatchSequenceElementMatchType], - AllOf[MatchSequenceElementMatchType], - AtLeastN[ - Union[ - MatchSequenceElementMatchType, - OneOf[MatchSequenceElementMatchType], - AllOf[MatchSequenceElementMatchType], - ] - ], - AtMostN[ - Union[ - MatchSequenceElementMatchType, - OneOf[MatchSequenceElementMatchType], - AllOf[MatchSequenceElementMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.MatchSequenceElement]], - ] - ], - ] = DoNotCare() - kwds: Union[ - Sequence[ - Union[ - MatchKeywordElementMatchType, - DoNotCareSentinel, - OneOf[MatchKeywordElementMatchType], - AllOf[MatchKeywordElementMatchType], - AtLeastN[ - Union[ - MatchKeywordElementMatchType, - DoNotCareSentinel, - OneOf[MatchKeywordElementMatchType], - AllOf[MatchKeywordElementMatchType], - ] - ], - AtMostN[ - Union[ - MatchKeywordElementMatchType, - DoNotCareSentinel, - OneOf[MatchKeywordElementMatchType], - AllOf[MatchKeywordElementMatchType], - ] - ], - ] - ], - DoNotCareSentinel, - MatchIfTrue[Sequence[cst.MatchKeywordElement]], - OneOf[ - Union[ - Sequence[ - Union[ - MatchKeywordElementMatchType, - OneOf[MatchKeywordElementMatchType], - AllOf[MatchKeywordElementMatchType], - AtLeastN[ - Union[ - MatchKeywordElementMatchType, - OneOf[MatchKeywordElementMatchType], - AllOf[MatchKeywordElementMatchType], - ] - ], - AtMostN[ - Union[ - MatchKeywordElementMatchType, - OneOf[MatchKeywordElementMatchType], - AllOf[MatchKeywordElementMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.MatchKeywordElement]], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - MatchKeywordElementMatchType, - OneOf[MatchKeywordElementMatchType], - AllOf[MatchKeywordElementMatchType], - AtLeastN[ - Union[ - MatchKeywordElementMatchType, - OneOf[MatchKeywordElementMatchType], - AllOf[MatchKeywordElementMatchType], - ] - ], - AtMostN[ - Union[ - MatchKeywordElementMatchType, - OneOf[MatchKeywordElementMatchType], - AllOf[MatchKeywordElementMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.MatchKeywordElement]], - ] - ], - ] = DoNotCare() - whitespace_after_cls: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - whitespace_before_patterns: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - whitespace_after_kwds: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - lpar: Union[ - Sequence[ - Union[ - LeftParenMatchType, - DoNotCareSentinel, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - AtLeastN[ - Union[ - LeftParenMatchType, - DoNotCareSentinel, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - AtMostN[ - Union[ - LeftParenMatchType, - DoNotCareSentinel, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - ] - ], - DoNotCareSentinel, - MatchIfTrue[Sequence[cst.LeftParen]], - OneOf[ - Union[ - Sequence[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - AtLeastN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - AtMostN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.LeftParen]], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - AtLeastN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - AtMostN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.LeftParen]], - ] - ], - ] = DoNotCare() - rpar: Union[ - Sequence[ - Union[ - RightParenMatchType, - DoNotCareSentinel, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - AtLeastN[ - Union[ - RightParenMatchType, - DoNotCareSentinel, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - AtMostN[ - Union[ - RightParenMatchType, - DoNotCareSentinel, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - ] - ], - DoNotCareSentinel, - MatchIfTrue[Sequence[cst.RightParen]], - OneOf[ - Union[ - Sequence[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - AtLeastN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - AtMostN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.RightParen]], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - AtLeastN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - AtMostN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.RightParen]], - ] - ], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class MatchKeywordElement(BaseMatcherNode): - key: Union[ - NameMatchType, DoNotCareSentinel, OneOf[NameMatchType], AllOf[NameMatchType] - ] = DoNotCare() - pattern: Union[ - MatchPatternMatchType, - DoNotCareSentinel, - OneOf[MatchPatternMatchType], - AllOf[MatchPatternMatchType], - ] = DoNotCare() - comma: Union[ - CommaMatchType, DoNotCareSentinel, OneOf[CommaMatchType], AllOf[CommaMatchType] - ] = DoNotCare() - whitespace_before_equal: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - whitespace_after_equal: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -MatchSequenceElementOrMatchStarMatchType = Union[ - "MatchSequenceElement", - "MatchStar", - MetadataMatchType, - MatchIfTrue[Union[cst.MatchSequenceElement, cst.MatchStar]], -] - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class MatchList(BaseMatcherNode): - patterns: Union[ - Sequence[ - Union[ - MatchSequenceElementOrMatchStarMatchType, - DoNotCareSentinel, - OneOf[MatchSequenceElementOrMatchStarMatchType], - AllOf[MatchSequenceElementOrMatchStarMatchType], - AtLeastN[ - Union[ - MatchSequenceElementOrMatchStarMatchType, - DoNotCareSentinel, - OneOf[MatchSequenceElementOrMatchStarMatchType], - AllOf[MatchSequenceElementOrMatchStarMatchType], - ] - ], - AtMostN[ - Union[ - MatchSequenceElementOrMatchStarMatchType, - DoNotCareSentinel, - OneOf[MatchSequenceElementOrMatchStarMatchType], - AllOf[MatchSequenceElementOrMatchStarMatchType], - ] - ], - ] - ], - DoNotCareSentinel, - MatchIfTrue[ - Sequence[ - Union[ - cst.MatchSequenceElement, - cst.MatchStar, - OneOf[Union[cst.MatchSequenceElement, cst.MatchStar]], - AllOf[Union[cst.MatchSequenceElement, cst.MatchStar]], - ] - ] - ], - OneOf[ - Union[ - Sequence[ - Union[ - MatchSequenceElementOrMatchStarMatchType, - OneOf[MatchSequenceElementOrMatchStarMatchType], - AllOf[MatchSequenceElementOrMatchStarMatchType], - AtLeastN[ - Union[ - MatchSequenceElementOrMatchStarMatchType, - OneOf[MatchSequenceElementOrMatchStarMatchType], - AllOf[MatchSequenceElementOrMatchStarMatchType], - ] - ], - AtMostN[ - Union[ - MatchSequenceElementOrMatchStarMatchType, - OneOf[MatchSequenceElementOrMatchStarMatchType], - AllOf[MatchSequenceElementOrMatchStarMatchType], - ] - ], - ] - ], - MatchIfTrue[ - Sequence[ - Union[ - cst.MatchSequenceElement, - cst.MatchStar, - OneOf[Union[cst.MatchSequenceElement, cst.MatchStar]], - AllOf[Union[cst.MatchSequenceElement, cst.MatchStar]], - ] - ] - ], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - MatchSequenceElementOrMatchStarMatchType, - OneOf[MatchSequenceElementOrMatchStarMatchType], - AllOf[MatchSequenceElementOrMatchStarMatchType], - AtLeastN[ - Union[ - MatchSequenceElementOrMatchStarMatchType, - OneOf[MatchSequenceElementOrMatchStarMatchType], - AllOf[MatchSequenceElementOrMatchStarMatchType], - ] - ], - AtMostN[ - Union[ - MatchSequenceElementOrMatchStarMatchType, - OneOf[MatchSequenceElementOrMatchStarMatchType], - AllOf[MatchSequenceElementOrMatchStarMatchType], - ] - ], - ] - ], - MatchIfTrue[ - Sequence[ - Union[ - cst.MatchSequenceElement, - cst.MatchStar, - OneOf[Union[cst.MatchSequenceElement, cst.MatchStar]], - AllOf[Union[cst.MatchSequenceElement, cst.MatchStar]], - ] - ] - ], - ] - ], - ] = DoNotCare() - lbracket: Union[ - Optional["LeftSquareBracket"], - MetadataMatchType, - MatchIfTrue[Optional[cst.LeftSquareBracket]], - DoNotCareSentinel, - OneOf[ - Union[ - Optional["LeftSquareBracket"], - MetadataMatchType, - MatchIfTrue[Optional[cst.LeftSquareBracket]], - ] - ], - AllOf[ - Union[ - Optional["LeftSquareBracket"], - MetadataMatchType, - MatchIfTrue[Optional[cst.LeftSquareBracket]], - ] - ], - ] = DoNotCare() - rbracket: Union[ - Optional["RightSquareBracket"], - MetadataMatchType, - MatchIfTrue[Optional[cst.RightSquareBracket]], - DoNotCareSentinel, - OneOf[ - Union[ - Optional["RightSquareBracket"], - MetadataMatchType, - MatchIfTrue[Optional[cst.RightSquareBracket]], - ] - ], - AllOf[ - Union[ - Optional["RightSquareBracket"], - MetadataMatchType, - MatchIfTrue[Optional[cst.RightSquareBracket]], - ] - ], - ] = DoNotCare() - lpar: Union[ - Sequence[ - Union[ - LeftParenMatchType, - DoNotCareSentinel, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - AtLeastN[ - Union[ - LeftParenMatchType, - DoNotCareSentinel, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - AtMostN[ - Union[ - LeftParenMatchType, - DoNotCareSentinel, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - ] - ], - DoNotCareSentinel, - MatchIfTrue[Sequence[cst.LeftParen]], - OneOf[ - Union[ - Sequence[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - AtLeastN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - AtMostN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.LeftParen]], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - AtLeastN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - AtMostN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.LeftParen]], - ] - ], - ] = DoNotCare() - rpar: Union[ - Sequence[ - Union[ - RightParenMatchType, - DoNotCareSentinel, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - AtLeastN[ - Union[ - RightParenMatchType, - DoNotCareSentinel, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - AtMostN[ - Union[ - RightParenMatchType, - DoNotCareSentinel, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - ] - ], - DoNotCareSentinel, - MatchIfTrue[Sequence[cst.RightParen]], - OneOf[ - Union[ - Sequence[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - AtLeastN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - AtMostN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.RightParen]], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - AtLeastN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - AtMostN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.RightParen]], - ] - ], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -MatchMappingElementMatchType = Union[ - "MatchMappingElement", MetadataMatchType, MatchIfTrue[cst.MatchMappingElement] -] - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class MatchMapping(BaseMatcherNode): - elements: Union[ - Sequence[ - Union[ - MatchMappingElementMatchType, - DoNotCareSentinel, - OneOf[MatchMappingElementMatchType], - AllOf[MatchMappingElementMatchType], - AtLeastN[ - Union[ - MatchMappingElementMatchType, - DoNotCareSentinel, - OneOf[MatchMappingElementMatchType], - AllOf[MatchMappingElementMatchType], - ] - ], - AtMostN[ - Union[ - MatchMappingElementMatchType, - DoNotCareSentinel, - OneOf[MatchMappingElementMatchType], - AllOf[MatchMappingElementMatchType], - ] - ], - ] - ], - DoNotCareSentinel, - MatchIfTrue[Sequence[cst.MatchMappingElement]], - OneOf[ - Union[ - Sequence[ - Union[ - MatchMappingElementMatchType, - OneOf[MatchMappingElementMatchType], - AllOf[MatchMappingElementMatchType], - AtLeastN[ - Union[ - MatchMappingElementMatchType, - OneOf[MatchMappingElementMatchType], - AllOf[MatchMappingElementMatchType], - ] - ], - AtMostN[ - Union[ - MatchMappingElementMatchType, - OneOf[MatchMappingElementMatchType], - AllOf[MatchMappingElementMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.MatchMappingElement]], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - MatchMappingElementMatchType, - OneOf[MatchMappingElementMatchType], - AllOf[MatchMappingElementMatchType], - AtLeastN[ - Union[ - MatchMappingElementMatchType, - OneOf[MatchMappingElementMatchType], - AllOf[MatchMappingElementMatchType], - ] - ], - AtMostN[ - Union[ - MatchMappingElementMatchType, - OneOf[MatchMappingElementMatchType], - AllOf[MatchMappingElementMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.MatchMappingElement]], - ] - ], - ] = DoNotCare() - lbrace: Union[ - LeftCurlyBraceMatchType, - DoNotCareSentinel, - OneOf[LeftCurlyBraceMatchType], - AllOf[LeftCurlyBraceMatchType], - ] = DoNotCare() - rbrace: Union[ - RightCurlyBraceMatchType, - DoNotCareSentinel, - OneOf[RightCurlyBraceMatchType], - AllOf[RightCurlyBraceMatchType], - ] = DoNotCare() - rest: Union[ - Optional["Name"], - MetadataMatchType, - MatchIfTrue[Optional[cst.Name]], - DoNotCareSentinel, - OneOf[ - Union[Optional["Name"], MetadataMatchType, MatchIfTrue[Optional[cst.Name]]] - ], - AllOf[ - Union[Optional["Name"], MetadataMatchType, MatchIfTrue[Optional[cst.Name]]] - ], - ] = DoNotCare() - whitespace_before_rest: Union[ - SimpleWhitespaceMatchType, - DoNotCareSentinel, - OneOf[SimpleWhitespaceMatchType], - AllOf[SimpleWhitespaceMatchType], - ] = DoNotCare() - trailing_comma: Union[ - Optional["Comma"], - MetadataMatchType, - MatchIfTrue[Optional[cst.Comma]], - DoNotCareSentinel, - OneOf[ - Union[ - Optional["Comma"], MetadataMatchType, MatchIfTrue[Optional[cst.Comma]] - ] - ], - AllOf[ - Union[ - Optional["Comma"], MetadataMatchType, MatchIfTrue[Optional[cst.Comma]] - ] - ], - ] = DoNotCare() - lpar: Union[ - Sequence[ - Union[ - LeftParenMatchType, - DoNotCareSentinel, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - AtLeastN[ - Union[ - LeftParenMatchType, - DoNotCareSentinel, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - AtMostN[ - Union[ - LeftParenMatchType, - DoNotCareSentinel, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - ] - ], - DoNotCareSentinel, - MatchIfTrue[Sequence[cst.LeftParen]], - OneOf[ - Union[ - Sequence[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - AtLeastN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - AtMostN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.LeftParen]], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - AtLeastN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - AtMostN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.LeftParen]], - ] - ], - ] = DoNotCare() - rpar: Union[ - Sequence[ - Union[ - RightParenMatchType, - DoNotCareSentinel, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - AtLeastN[ - Union[ - RightParenMatchType, - DoNotCareSentinel, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - AtMostN[ - Union[ - RightParenMatchType, - DoNotCareSentinel, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - ] - ], - DoNotCareSentinel, - MatchIfTrue[Sequence[cst.RightParen]], - OneOf[ - Union[ - Sequence[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - AtLeastN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - AtMostN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.RightParen]], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - AtLeastN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - AtMostN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.RightParen]], - ] - ], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class MatchMappingElement(BaseMatcherNode): - key: Union[ - BaseExpressionMatchType, - DoNotCareSentinel, - OneOf[BaseExpressionMatchType], - AllOf[BaseExpressionMatchType], - ] = DoNotCare() - pattern: Union[ - MatchPatternMatchType, - DoNotCareSentinel, - OneOf[MatchPatternMatchType], - AllOf[MatchPatternMatchType], - ] = DoNotCare() - comma: Union[ - CommaMatchType, DoNotCareSentinel, OneOf[CommaMatchType], AllOf[CommaMatchType] - ] = DoNotCare() - whitespace_before_colon: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - whitespace_after_colon: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -MatchOrElementMatchType = Union[ - "MatchOrElement", MetadataMatchType, MatchIfTrue[cst.MatchOrElement] -] - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class MatchOr(BaseMatcherNode): - patterns: Union[ - Sequence[ - Union[ - MatchOrElementMatchType, - DoNotCareSentinel, - OneOf[MatchOrElementMatchType], - AllOf[MatchOrElementMatchType], - AtLeastN[ - Union[ - MatchOrElementMatchType, - DoNotCareSentinel, - OneOf[MatchOrElementMatchType], - AllOf[MatchOrElementMatchType], - ] - ], - AtMostN[ - Union[ - MatchOrElementMatchType, - DoNotCareSentinel, - OneOf[MatchOrElementMatchType], - AllOf[MatchOrElementMatchType], - ] - ], - ] - ], - DoNotCareSentinel, - MatchIfTrue[Sequence[cst.MatchOrElement]], - OneOf[ - Union[ - Sequence[ - Union[ - MatchOrElementMatchType, - OneOf[MatchOrElementMatchType], - AllOf[MatchOrElementMatchType], - AtLeastN[ - Union[ - MatchOrElementMatchType, - OneOf[MatchOrElementMatchType], - AllOf[MatchOrElementMatchType], - ] - ], - AtMostN[ - Union[ - MatchOrElementMatchType, - OneOf[MatchOrElementMatchType], - AllOf[MatchOrElementMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.MatchOrElement]], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - MatchOrElementMatchType, - OneOf[MatchOrElementMatchType], - AllOf[MatchOrElementMatchType], - AtLeastN[ - Union[ - MatchOrElementMatchType, - OneOf[MatchOrElementMatchType], - AllOf[MatchOrElementMatchType], - ] - ], - AtMostN[ - Union[ - MatchOrElementMatchType, - OneOf[MatchOrElementMatchType], - AllOf[MatchOrElementMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.MatchOrElement]], - ] - ], - ] = DoNotCare() - lpar: Union[ - Sequence[ - Union[ - LeftParenMatchType, - DoNotCareSentinel, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - AtLeastN[ - Union[ - LeftParenMatchType, - DoNotCareSentinel, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - AtMostN[ - Union[ - LeftParenMatchType, - DoNotCareSentinel, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - ] - ], - DoNotCareSentinel, - MatchIfTrue[Sequence[cst.LeftParen]], - OneOf[ - Union[ - Sequence[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - AtLeastN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - AtMostN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.LeftParen]], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - AtLeastN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - AtMostN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.LeftParen]], - ] - ], - ] = DoNotCare() - rpar: Union[ - Sequence[ - Union[ - RightParenMatchType, - DoNotCareSentinel, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - AtLeastN[ - Union[ - RightParenMatchType, - DoNotCareSentinel, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - AtMostN[ - Union[ - RightParenMatchType, - DoNotCareSentinel, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - ] - ], - DoNotCareSentinel, - MatchIfTrue[Sequence[cst.RightParen]], - OneOf[ - Union[ - Sequence[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - AtLeastN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - AtMostN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.RightParen]], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - AtLeastN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - AtMostN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.RightParen]], - ] - ], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -BitOrMatchType = Union["BitOr", MetadataMatchType, MatchIfTrue[cst.BitOr]] - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class MatchOrElement(BaseMatcherNode): - pattern: Union[ - MatchPatternMatchType, - DoNotCareSentinel, - OneOf[MatchPatternMatchType], - AllOf[MatchPatternMatchType], - ] = DoNotCare() - separator: Union[ - BitOrMatchType, DoNotCareSentinel, OneOf[BitOrMatchType], AllOf[BitOrMatchType] - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class MatchPattern(BaseMatcherNode): - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class MatchSequence(BaseMatcherNode): - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class MatchSequenceElement(BaseMatcherNode): - value: Union[ - MatchPatternMatchType, - DoNotCareSentinel, - OneOf[MatchPatternMatchType], - AllOf[MatchPatternMatchType], - ] = DoNotCare() - comma: Union[ - CommaMatchType, DoNotCareSentinel, OneOf[CommaMatchType], AllOf[CommaMatchType] - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class MatchSingleton(BaseMatcherNode): - value: Union[ - NameMatchType, DoNotCareSentinel, OneOf[NameMatchType], AllOf[NameMatchType] - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class MatchStar(BaseMatcherNode): - name: Union[ - Optional["Name"], - MetadataMatchType, - MatchIfTrue[Optional[cst.Name]], - DoNotCareSentinel, - OneOf[ - Union[Optional["Name"], MetadataMatchType, MatchIfTrue[Optional[cst.Name]]] - ], - AllOf[ - Union[Optional["Name"], MetadataMatchType, MatchIfTrue[Optional[cst.Name]]] - ], - ] = DoNotCare() - comma: Union[ - CommaMatchType, DoNotCareSentinel, OneOf[CommaMatchType], AllOf[CommaMatchType] - ] = DoNotCare() - whitespace_before_name: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class MatchTuple(BaseMatcherNode): - patterns: Union[ - Sequence[ - Union[ - MatchSequenceElementOrMatchStarMatchType, - DoNotCareSentinel, - OneOf[MatchSequenceElementOrMatchStarMatchType], - AllOf[MatchSequenceElementOrMatchStarMatchType], - AtLeastN[ - Union[ - MatchSequenceElementOrMatchStarMatchType, - DoNotCareSentinel, - OneOf[MatchSequenceElementOrMatchStarMatchType], - AllOf[MatchSequenceElementOrMatchStarMatchType], - ] - ], - AtMostN[ - Union[ - MatchSequenceElementOrMatchStarMatchType, - DoNotCareSentinel, - OneOf[MatchSequenceElementOrMatchStarMatchType], - AllOf[MatchSequenceElementOrMatchStarMatchType], - ] - ], - ] - ], - DoNotCareSentinel, - MatchIfTrue[ - Sequence[ - Union[ - cst.MatchSequenceElement, - cst.MatchStar, - OneOf[Union[cst.MatchSequenceElement, cst.MatchStar]], - AllOf[Union[cst.MatchSequenceElement, cst.MatchStar]], - ] - ] - ], - OneOf[ - Union[ - Sequence[ - Union[ - MatchSequenceElementOrMatchStarMatchType, - OneOf[MatchSequenceElementOrMatchStarMatchType], - AllOf[MatchSequenceElementOrMatchStarMatchType], - AtLeastN[ - Union[ - MatchSequenceElementOrMatchStarMatchType, - OneOf[MatchSequenceElementOrMatchStarMatchType], - AllOf[MatchSequenceElementOrMatchStarMatchType], - ] - ], - AtMostN[ - Union[ - MatchSequenceElementOrMatchStarMatchType, - OneOf[MatchSequenceElementOrMatchStarMatchType], - AllOf[MatchSequenceElementOrMatchStarMatchType], - ] - ], - ] - ], - MatchIfTrue[ - Sequence[ - Union[ - cst.MatchSequenceElement, - cst.MatchStar, - OneOf[Union[cst.MatchSequenceElement, cst.MatchStar]], - AllOf[Union[cst.MatchSequenceElement, cst.MatchStar]], - ] - ] - ], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - MatchSequenceElementOrMatchStarMatchType, - OneOf[MatchSequenceElementOrMatchStarMatchType], - AllOf[MatchSequenceElementOrMatchStarMatchType], - AtLeastN[ - Union[ - MatchSequenceElementOrMatchStarMatchType, - OneOf[MatchSequenceElementOrMatchStarMatchType], - AllOf[MatchSequenceElementOrMatchStarMatchType], - ] - ], - AtMostN[ - Union[ - MatchSequenceElementOrMatchStarMatchType, - OneOf[MatchSequenceElementOrMatchStarMatchType], - AllOf[MatchSequenceElementOrMatchStarMatchType], - ] - ], - ] - ], - MatchIfTrue[ - Sequence[ - Union[ - cst.MatchSequenceElement, - cst.MatchStar, - OneOf[Union[cst.MatchSequenceElement, cst.MatchStar]], - AllOf[Union[cst.MatchSequenceElement, cst.MatchStar]], - ] - ] - ], - ] - ], - ] = DoNotCare() - lpar: Union[ - Sequence[ - Union[ - LeftParenMatchType, - DoNotCareSentinel, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - AtLeastN[ - Union[ - LeftParenMatchType, - DoNotCareSentinel, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - AtMostN[ - Union[ - LeftParenMatchType, - DoNotCareSentinel, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - ] - ], - DoNotCareSentinel, - MatchIfTrue[Sequence[cst.LeftParen]], - OneOf[ - Union[ - Sequence[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - AtLeastN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - AtMostN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.LeftParen]], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - AtLeastN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - AtMostN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.LeftParen]], - ] - ], - ] = DoNotCare() - rpar: Union[ - Sequence[ - Union[ - RightParenMatchType, - DoNotCareSentinel, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - AtLeastN[ - Union[ - RightParenMatchType, - DoNotCareSentinel, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - AtMostN[ - Union[ - RightParenMatchType, - DoNotCareSentinel, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - ] - ], - DoNotCareSentinel, - MatchIfTrue[Sequence[cst.RightParen]], - OneOf[ - Union[ - Sequence[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - AtLeastN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - AtMostN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.RightParen]], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - AtLeastN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - AtMostN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.RightParen]], - ] - ], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class MatchValue(BaseMatcherNode): - value: Union[ - BaseExpressionMatchType, - DoNotCareSentinel, - OneOf[BaseExpressionMatchType], - AllOf[BaseExpressionMatchType], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class MatrixMultiply(BaseBinaryOp, BaseMatcherNode): - whitespace_before: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - whitespace_after: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class MatrixMultiplyAssign(BaseAugOp, BaseMatcherNode): - whitespace_before: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - whitespace_after: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class Minus(BaseUnaryOp, BaseMatcherNode): - whitespace_after: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -SimpleStatementLineOrBaseCompoundStatementMatchType = Union[ - "SimpleStatementLine", - "BaseCompoundStatement", - MetadataMatchType, - MatchIfTrue[Union[cst.SimpleStatementLine, cst.BaseCompoundStatement]], -] - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class Module(BaseMatcherNode): - body: Union[ - Sequence[ - Union[ - SimpleStatementLineOrBaseCompoundStatementMatchType, - DoNotCareSentinel, - OneOf[SimpleStatementLineOrBaseCompoundStatementMatchType], - AllOf[SimpleStatementLineOrBaseCompoundStatementMatchType], - AtLeastN[ - Union[ - SimpleStatementLineOrBaseCompoundStatementMatchType, - DoNotCareSentinel, - OneOf[SimpleStatementLineOrBaseCompoundStatementMatchType], - AllOf[SimpleStatementLineOrBaseCompoundStatementMatchType], - ] - ], - AtMostN[ - Union[ - SimpleStatementLineOrBaseCompoundStatementMatchType, - DoNotCareSentinel, - OneOf[SimpleStatementLineOrBaseCompoundStatementMatchType], - AllOf[SimpleStatementLineOrBaseCompoundStatementMatchType], - ] - ], - ] - ], - DoNotCareSentinel, - MatchIfTrue[ - Sequence[ - Union[ - cst.SimpleStatementLine, - cst.BaseCompoundStatement, - OneOf[Union[cst.SimpleStatementLine, cst.BaseCompoundStatement]], - AllOf[Union[cst.SimpleStatementLine, cst.BaseCompoundStatement]], - ] - ] - ], - OneOf[ - Union[ - Sequence[ - Union[ - SimpleStatementLineOrBaseCompoundStatementMatchType, - OneOf[SimpleStatementLineOrBaseCompoundStatementMatchType], - AllOf[SimpleStatementLineOrBaseCompoundStatementMatchType], - AtLeastN[ - Union[ - SimpleStatementLineOrBaseCompoundStatementMatchType, - OneOf[ - SimpleStatementLineOrBaseCompoundStatementMatchType - ], - AllOf[ - SimpleStatementLineOrBaseCompoundStatementMatchType - ], - ] - ], - AtMostN[ - Union[ - SimpleStatementLineOrBaseCompoundStatementMatchType, - OneOf[ - SimpleStatementLineOrBaseCompoundStatementMatchType - ], - AllOf[ - SimpleStatementLineOrBaseCompoundStatementMatchType - ], - ] - ], - ] - ], - MatchIfTrue[ - Sequence[ - Union[ - cst.SimpleStatementLine, - cst.BaseCompoundStatement, - OneOf[ - Union[ - cst.SimpleStatementLine, cst.BaseCompoundStatement - ] - ], - AllOf[ - Union[ - cst.SimpleStatementLine, cst.BaseCompoundStatement - ] - ], - ] - ] - ], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - SimpleStatementLineOrBaseCompoundStatementMatchType, - OneOf[SimpleStatementLineOrBaseCompoundStatementMatchType], - AllOf[SimpleStatementLineOrBaseCompoundStatementMatchType], - AtLeastN[ - Union[ - SimpleStatementLineOrBaseCompoundStatementMatchType, - OneOf[ - SimpleStatementLineOrBaseCompoundStatementMatchType - ], - AllOf[ - SimpleStatementLineOrBaseCompoundStatementMatchType - ], - ] - ], - AtMostN[ - Union[ - SimpleStatementLineOrBaseCompoundStatementMatchType, - OneOf[ - SimpleStatementLineOrBaseCompoundStatementMatchType - ], - AllOf[ - SimpleStatementLineOrBaseCompoundStatementMatchType - ], - ] - ], - ] - ], - MatchIfTrue[ - Sequence[ - Union[ - cst.SimpleStatementLine, - cst.BaseCompoundStatement, - OneOf[ - Union[ - cst.SimpleStatementLine, cst.BaseCompoundStatement - ] - ], - AllOf[ - Union[ - cst.SimpleStatementLine, cst.BaseCompoundStatement - ] - ], - ] - ] - ], - ] - ], - ] = DoNotCare() - header: Union[ - Sequence[ - Union[ - EmptyLineMatchType, - DoNotCareSentinel, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - AtLeastN[ - Union[ - EmptyLineMatchType, - DoNotCareSentinel, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - AtMostN[ - Union[ - EmptyLineMatchType, - DoNotCareSentinel, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - ] - ], - DoNotCareSentinel, - MatchIfTrue[Sequence[cst.EmptyLine]], - OneOf[ - Union[ - Sequence[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - AtLeastN[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - AtMostN[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.EmptyLine]], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - AtLeastN[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - AtMostN[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.EmptyLine]], - ] - ], - ] = DoNotCare() - footer: Union[ - Sequence[ - Union[ - EmptyLineMatchType, - DoNotCareSentinel, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - AtLeastN[ - Union[ - EmptyLineMatchType, - DoNotCareSentinel, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - AtMostN[ - Union[ - EmptyLineMatchType, - DoNotCareSentinel, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - ] - ], - DoNotCareSentinel, - MatchIfTrue[Sequence[cst.EmptyLine]], - OneOf[ - Union[ - Sequence[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - AtLeastN[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - AtMostN[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.EmptyLine]], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - AtLeastN[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - AtMostN[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.EmptyLine]], - ] - ], - ] = DoNotCare() - encoding: Union[ - strMatchType, DoNotCareSentinel, OneOf[strMatchType], AllOf[strMatchType] - ] = DoNotCare() - default_indent: Union[ - strMatchType, DoNotCareSentinel, OneOf[strMatchType], AllOf[strMatchType] - ] = DoNotCare() - default_newline: Union[ - strMatchType, DoNotCareSentinel, OneOf[strMatchType], AllOf[strMatchType] - ] = DoNotCare() - has_trailing_newline: Union[ - boolMatchType, DoNotCareSentinel, OneOf[boolMatchType], AllOf[boolMatchType] - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class Modulo(BaseBinaryOp, BaseMatcherNode): - whitespace_before: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - whitespace_after: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class ModuloAssign(BaseAugOp, BaseMatcherNode): - whitespace_before: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - whitespace_after: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class Multiply(BaseBinaryOp, BaseMatcherNode): - whitespace_before: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - whitespace_after: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class MultiplyAssign(BaseAugOp, BaseMatcherNode): - whitespace_before: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - whitespace_after: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class Name( - BaseAssignTargetExpression, BaseDelTargetExpression, BaseExpression, BaseMatcherNode -): - value: Union[ - strMatchType, DoNotCareSentinel, OneOf[strMatchType], AllOf[strMatchType] - ] = DoNotCare() - lpar: Union[ - Sequence[ - Union[ - LeftParenMatchType, - DoNotCareSentinel, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - AtLeastN[ - Union[ - LeftParenMatchType, - DoNotCareSentinel, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - AtMostN[ - Union[ - LeftParenMatchType, - DoNotCareSentinel, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - ] - ], - DoNotCareSentinel, - MatchIfTrue[Sequence[cst.LeftParen]], - OneOf[ - Union[ - Sequence[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - AtLeastN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - AtMostN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.LeftParen]], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - AtLeastN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - AtMostN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.LeftParen]], - ] - ], - ] = DoNotCare() - rpar: Union[ - Sequence[ - Union[ - RightParenMatchType, - DoNotCareSentinel, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - AtLeastN[ - Union[ - RightParenMatchType, - DoNotCareSentinel, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - AtMostN[ - Union[ - RightParenMatchType, - DoNotCareSentinel, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - ] - ], - DoNotCareSentinel, - MatchIfTrue[Sequence[cst.RightParen]], - OneOf[ - Union[ - Sequence[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - AtLeastN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - AtMostN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.RightParen]], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - AtLeastN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - AtMostN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.RightParen]], - ] - ], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class NameItem(BaseMatcherNode): - name: Union[ - NameMatchType, DoNotCareSentinel, OneOf[NameMatchType], AllOf[NameMatchType] - ] = DoNotCare() - comma: Union[ - CommaMatchType, DoNotCareSentinel, OneOf[CommaMatchType], AllOf[CommaMatchType] - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class NamedExpr(BaseExpression, BaseMatcherNode): - target: Union[ - BaseExpressionMatchType, - DoNotCareSentinel, - OneOf[BaseExpressionMatchType], - AllOf[BaseExpressionMatchType], - ] = DoNotCare() - value: Union[ - BaseExpressionMatchType, - DoNotCareSentinel, - OneOf[BaseExpressionMatchType], - AllOf[BaseExpressionMatchType], - ] = DoNotCare() - lpar: Union[ - Sequence[ - Union[ - LeftParenMatchType, - DoNotCareSentinel, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - AtLeastN[ - Union[ - LeftParenMatchType, - DoNotCareSentinel, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - AtMostN[ - Union[ - LeftParenMatchType, - DoNotCareSentinel, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - ] - ], - DoNotCareSentinel, - MatchIfTrue[Sequence[cst.LeftParen]], - OneOf[ - Union[ - Sequence[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - AtLeastN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - AtMostN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.LeftParen]], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - AtLeastN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - AtMostN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.LeftParen]], - ] - ], - ] = DoNotCare() - rpar: Union[ - Sequence[ - Union[ - RightParenMatchType, - DoNotCareSentinel, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - AtLeastN[ - Union[ - RightParenMatchType, - DoNotCareSentinel, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - AtMostN[ - Union[ - RightParenMatchType, - DoNotCareSentinel, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - ] - ], - DoNotCareSentinel, - MatchIfTrue[Sequence[cst.RightParen]], - OneOf[ - Union[ - Sequence[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - AtLeastN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - AtMostN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.RightParen]], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - AtLeastN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - AtMostN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.RightParen]], - ] - ], - ] = DoNotCare() - whitespace_before_walrus: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - whitespace_after_walrus: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class Newline(BaseMatcherNode): - value: Union[ - Optional[str], - MetadataMatchType, - MatchIfTrue[Optional[str]], - DoNotCareSentinel, - OneOf[Union[Optional[str], MetadataMatchType, MatchIfTrue[Optional[str]]]], - AllOf[Union[Optional[str], MetadataMatchType, MatchIfTrue[Optional[str]]]], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class Nonlocal(BaseSmallStatement, BaseMatcherNode): - names: Union[ - Sequence[ - Union[ - NameItemMatchType, - DoNotCareSentinel, - OneOf[NameItemMatchType], - AllOf[NameItemMatchType], - AtLeastN[ - Union[ - NameItemMatchType, - DoNotCareSentinel, - OneOf[NameItemMatchType], - AllOf[NameItemMatchType], - ] - ], - AtMostN[ - Union[ - NameItemMatchType, - DoNotCareSentinel, - OneOf[NameItemMatchType], - AllOf[NameItemMatchType], - ] - ], - ] - ], - DoNotCareSentinel, - MatchIfTrue[Sequence[cst.NameItem]], - OneOf[ - Union[ - Sequence[ - Union[ - NameItemMatchType, - OneOf[NameItemMatchType], - AllOf[NameItemMatchType], - AtLeastN[ - Union[ - NameItemMatchType, - OneOf[NameItemMatchType], - AllOf[NameItemMatchType], - ] - ], - AtMostN[ - Union[ - NameItemMatchType, - OneOf[NameItemMatchType], - AllOf[NameItemMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.NameItem]], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - NameItemMatchType, - OneOf[NameItemMatchType], - AllOf[NameItemMatchType], - AtLeastN[ - Union[ - NameItemMatchType, - OneOf[NameItemMatchType], - AllOf[NameItemMatchType], - ] - ], - AtMostN[ - Union[ - NameItemMatchType, - OneOf[NameItemMatchType], - AllOf[NameItemMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.NameItem]], - ] - ], - ] = DoNotCare() - whitespace_after_nonlocal: Union[ - SimpleWhitespaceMatchType, - DoNotCareSentinel, - OneOf[SimpleWhitespaceMatchType], - AllOf[SimpleWhitespaceMatchType], - ] = DoNotCare() - semicolon: Union[ - SemicolonMatchType, - DoNotCareSentinel, - OneOf[SemicolonMatchType], - AllOf[SemicolonMatchType], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class Not(BaseUnaryOp, BaseMatcherNode): - whitespace_after: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class NotEqual(BaseCompOp, BaseMatcherNode): - value: Union[ - strMatchType, DoNotCareSentinel, OneOf[strMatchType], AllOf[strMatchType] - ] = DoNotCare() - whitespace_before: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - whitespace_after: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class NotIn(BaseCompOp, BaseMatcherNode): - whitespace_before: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - whitespace_between: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - whitespace_after: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class Or(BaseBooleanOp, BaseMatcherNode): - whitespace_before: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - whitespace_after: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class Param(BaseMatcherNode): - name: Union[ - NameMatchType, DoNotCareSentinel, OneOf[NameMatchType], AllOf[NameMatchType] - ] = DoNotCare() - annotation: Union[ - Optional["Annotation"], - MetadataMatchType, - MatchIfTrue[Optional[cst.Annotation]], - DoNotCareSentinel, - OneOf[ - Union[ - Optional["Annotation"], - MetadataMatchType, - MatchIfTrue[Optional[cst.Annotation]], - ] - ], - AllOf[ - Union[ - Optional["Annotation"], - MetadataMatchType, - MatchIfTrue[Optional[cst.Annotation]], - ] - ], - ] = DoNotCare() - equal: Union[ - AssignEqualMatchType, - DoNotCareSentinel, - OneOf[AssignEqualMatchType], - AllOf[AssignEqualMatchType], - ] = DoNotCare() - default: Union[ - Optional["BaseExpression"], - MetadataMatchType, - MatchIfTrue[Optional[cst.BaseExpression]], - DoNotCareSentinel, - OneOf[ - Union[ - Optional["BaseExpression"], - MetadataMatchType, - MatchIfTrue[Optional[cst.BaseExpression]], - ] - ], - AllOf[ - Union[ - Optional["BaseExpression"], - MetadataMatchType, - MatchIfTrue[Optional[cst.BaseExpression]], - ] - ], - ] = DoNotCare() - comma: Union[ - CommaMatchType, DoNotCareSentinel, OneOf[CommaMatchType], AllOf[CommaMatchType] - ] = DoNotCare() - star: Union[ - strMatchType, DoNotCareSentinel, OneOf[strMatchType], AllOf[strMatchType] - ] = DoNotCare() - whitespace_after_star: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - whitespace_after_param: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class ParamSlash(BaseMatcherNode): - comma: Union[ - CommaMatchType, DoNotCareSentinel, OneOf[CommaMatchType], AllOf[CommaMatchType] - ] = DoNotCare() - whitespace_after: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class ParamSpec(BaseMatcherNode): - name: Union[ - NameMatchType, DoNotCareSentinel, OneOf[NameMatchType], AllOf[NameMatchType] - ] = DoNotCare() - whitespace_after_star: Union[ - SimpleWhitespaceMatchType, - DoNotCareSentinel, - OneOf[SimpleWhitespaceMatchType], - AllOf[SimpleWhitespaceMatchType], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class ParamStar(BaseMatcherNode): - comma: Union[ - CommaMatchType, DoNotCareSentinel, OneOf[CommaMatchType], AllOf[CommaMatchType] - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -ParamMatchType = Union["Param", MetadataMatchType, MatchIfTrue[cst.Param]] -ParamOrParamStarMatchType = Union[ - "Param", - "ParamStar", - MetadataMatchType, - MatchIfTrue[Union[cst.Param, cst.ParamStar]], -] -ParamSlashMatchType = Union[ - "ParamSlash", MetadataMatchType, MatchIfTrue[cst.ParamSlash] -] - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class Parameters(BaseMatcherNode): - params: Union[ - Sequence[ - Union[ - ParamMatchType, - DoNotCareSentinel, - OneOf[ParamMatchType], - AllOf[ParamMatchType], - AtLeastN[ - Union[ - ParamMatchType, - DoNotCareSentinel, - OneOf[ParamMatchType], - AllOf[ParamMatchType], - ] - ], - AtMostN[ - Union[ - ParamMatchType, - DoNotCareSentinel, - OneOf[ParamMatchType], - AllOf[ParamMatchType], - ] - ], - ] - ], - DoNotCareSentinel, - MatchIfTrue[Sequence[cst.Param]], - OneOf[ - Union[ - Sequence[ - Union[ - ParamMatchType, - OneOf[ParamMatchType], - AllOf[ParamMatchType], - AtLeastN[ - Union[ - ParamMatchType, - OneOf[ParamMatchType], - AllOf[ParamMatchType], - ] - ], - AtMostN[ - Union[ - ParamMatchType, - OneOf[ParamMatchType], - AllOf[ParamMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.Param]], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - ParamMatchType, - OneOf[ParamMatchType], - AllOf[ParamMatchType], - AtLeastN[ - Union[ - ParamMatchType, - OneOf[ParamMatchType], - AllOf[ParamMatchType], - ] - ], - AtMostN[ - Union[ - ParamMatchType, - OneOf[ParamMatchType], - AllOf[ParamMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.Param]], - ] - ], - ] = DoNotCare() - star_arg: Union[ - ParamOrParamStarMatchType, - DoNotCareSentinel, - OneOf[ParamOrParamStarMatchType], - AllOf[ParamOrParamStarMatchType], - ] = DoNotCare() - kwonly_params: Union[ - Sequence[ - Union[ - ParamMatchType, - DoNotCareSentinel, - OneOf[ParamMatchType], - AllOf[ParamMatchType], - AtLeastN[ - Union[ - ParamMatchType, - DoNotCareSentinel, - OneOf[ParamMatchType], - AllOf[ParamMatchType], - ] - ], - AtMostN[ - Union[ - ParamMatchType, - DoNotCareSentinel, - OneOf[ParamMatchType], - AllOf[ParamMatchType], - ] - ], - ] - ], - DoNotCareSentinel, - MatchIfTrue[Sequence[cst.Param]], - OneOf[ - Union[ - Sequence[ - Union[ - ParamMatchType, - OneOf[ParamMatchType], - AllOf[ParamMatchType], - AtLeastN[ - Union[ - ParamMatchType, - OneOf[ParamMatchType], - AllOf[ParamMatchType], - ] - ], - AtMostN[ - Union[ - ParamMatchType, - OneOf[ParamMatchType], - AllOf[ParamMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.Param]], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - ParamMatchType, - OneOf[ParamMatchType], - AllOf[ParamMatchType], - AtLeastN[ - Union[ - ParamMatchType, - OneOf[ParamMatchType], - AllOf[ParamMatchType], - ] - ], - AtMostN[ - Union[ - ParamMatchType, - OneOf[ParamMatchType], - AllOf[ParamMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.Param]], - ] - ], - ] = DoNotCare() - star_kwarg: Union[ - Optional["Param"], - MetadataMatchType, - MatchIfTrue[Optional[cst.Param]], - DoNotCareSentinel, - OneOf[ - Union[ - Optional["Param"], MetadataMatchType, MatchIfTrue[Optional[cst.Param]] - ] - ], - AllOf[ - Union[ - Optional["Param"], MetadataMatchType, MatchIfTrue[Optional[cst.Param]] - ] - ], - ] = DoNotCare() - posonly_params: Union[ - Sequence[ - Union[ - ParamMatchType, - DoNotCareSentinel, - OneOf[ParamMatchType], - AllOf[ParamMatchType], - AtLeastN[ - Union[ - ParamMatchType, - DoNotCareSentinel, - OneOf[ParamMatchType], - AllOf[ParamMatchType], - ] - ], - AtMostN[ - Union[ - ParamMatchType, - DoNotCareSentinel, - OneOf[ParamMatchType], - AllOf[ParamMatchType], - ] - ], - ] - ], - DoNotCareSentinel, - MatchIfTrue[Sequence[cst.Param]], - OneOf[ - Union[ - Sequence[ - Union[ - ParamMatchType, - OneOf[ParamMatchType], - AllOf[ParamMatchType], - AtLeastN[ - Union[ - ParamMatchType, - OneOf[ParamMatchType], - AllOf[ParamMatchType], - ] - ], - AtMostN[ - Union[ - ParamMatchType, - OneOf[ParamMatchType], - AllOf[ParamMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.Param]], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - ParamMatchType, - OneOf[ParamMatchType], - AllOf[ParamMatchType], - AtLeastN[ - Union[ - ParamMatchType, - OneOf[ParamMatchType], - AllOf[ParamMatchType], - ] - ], - AtMostN[ - Union[ - ParamMatchType, - OneOf[ParamMatchType], - AllOf[ParamMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.Param]], - ] - ], - ] = DoNotCare() - posonly_ind: Union[ - ParamSlashMatchType, - DoNotCareSentinel, - OneOf[ParamSlashMatchType], - AllOf[ParamSlashMatchType], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class ParenthesizedWhitespace(BaseParenthesizableWhitespace, BaseMatcherNode): - first_line: Union[ - TrailingWhitespaceMatchType, - DoNotCareSentinel, - OneOf[TrailingWhitespaceMatchType], - AllOf[TrailingWhitespaceMatchType], - ] = DoNotCare() - empty_lines: Union[ - Sequence[ - Union[ - EmptyLineMatchType, - DoNotCareSentinel, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - AtLeastN[ - Union[ - EmptyLineMatchType, - DoNotCareSentinel, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - AtMostN[ - Union[ - EmptyLineMatchType, - DoNotCareSentinel, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - ] - ], - DoNotCareSentinel, - MatchIfTrue[Sequence[cst.EmptyLine]], - OneOf[ - Union[ - Sequence[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - AtLeastN[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - AtMostN[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.EmptyLine]], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - AtLeastN[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - AtMostN[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.EmptyLine]], - ] - ], - ] = DoNotCare() - indent: Union[ - boolMatchType, DoNotCareSentinel, OneOf[boolMatchType], AllOf[boolMatchType] - ] = DoNotCare() - last_line: Union[ - SimpleWhitespaceMatchType, - DoNotCareSentinel, - OneOf[SimpleWhitespaceMatchType], - AllOf[SimpleWhitespaceMatchType], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class Pass(BaseSmallStatement, BaseMatcherNode): - semicolon: Union[ - SemicolonMatchType, - DoNotCareSentinel, - OneOf[SemicolonMatchType], - AllOf[SemicolonMatchType], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class Plus(BaseUnaryOp, BaseMatcherNode): - whitespace_after: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class Power(BaseBinaryOp, BaseMatcherNode): - whitespace_before: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - whitespace_after: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class PowerAssign(BaseAugOp, BaseMatcherNode): - whitespace_before: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - whitespace_after: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class Raise(BaseSmallStatement, BaseMatcherNode): - exc: Union[ - Optional["BaseExpression"], - MetadataMatchType, - MatchIfTrue[Optional[cst.BaseExpression]], - DoNotCareSentinel, - OneOf[ - Union[ - Optional["BaseExpression"], - MetadataMatchType, - MatchIfTrue[Optional[cst.BaseExpression]], - ] - ], - AllOf[ - Union[ - Optional["BaseExpression"], - MetadataMatchType, - MatchIfTrue[Optional[cst.BaseExpression]], - ] - ], - ] = DoNotCare() - cause: Union[ - Optional["From"], - MetadataMatchType, - MatchIfTrue[Optional[cst.From]], - DoNotCareSentinel, - OneOf[ - Union[Optional["From"], MetadataMatchType, MatchIfTrue[Optional[cst.From]]] - ], - AllOf[ - Union[Optional["From"], MetadataMatchType, MatchIfTrue[Optional[cst.From]]] - ], - ] = DoNotCare() - whitespace_after_raise: Union[ - SimpleWhitespaceMatchType, - DoNotCareSentinel, - OneOf[SimpleWhitespaceMatchType], - AllOf[SimpleWhitespaceMatchType], - ] = DoNotCare() - semicolon: Union[ - SemicolonMatchType, - DoNotCareSentinel, - OneOf[SemicolonMatchType], - AllOf[SemicolonMatchType], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class Return(BaseSmallStatement, BaseMatcherNode): - value: Union[ - Optional["BaseExpression"], - MetadataMatchType, - MatchIfTrue[Optional[cst.BaseExpression]], - DoNotCareSentinel, - OneOf[ - Union[ - Optional["BaseExpression"], - MetadataMatchType, - MatchIfTrue[Optional[cst.BaseExpression]], - ] - ], - AllOf[ - Union[ - Optional["BaseExpression"], - MetadataMatchType, - MatchIfTrue[Optional[cst.BaseExpression]], - ] - ], - ] = DoNotCare() - whitespace_after_return: Union[ - SimpleWhitespaceMatchType, - DoNotCareSentinel, - OneOf[SimpleWhitespaceMatchType], - AllOf[SimpleWhitespaceMatchType], - ] = DoNotCare() - semicolon: Union[ - SemicolonMatchType, - DoNotCareSentinel, - OneOf[SemicolonMatchType], - AllOf[SemicolonMatchType], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class RightCurlyBrace(BaseMatcherNode): - whitespace_before: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class RightParen(BaseMatcherNode): - whitespace_before: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class RightShift(BaseBinaryOp, BaseMatcherNode): - whitespace_before: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - whitespace_after: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class RightShiftAssign(BaseAugOp, BaseMatcherNode): - whitespace_before: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - whitespace_after: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class RightSquareBracket(BaseMatcherNode): - whitespace_before: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class Semicolon(BaseMatcherNode): - whitespace_before: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - whitespace_after: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class Set(BaseExpression, BaseSet, BaseMatcherNode): - elements: Union[ - Sequence[ - Union[ - BaseElementMatchType, - DoNotCareSentinel, - OneOf[BaseElementMatchType], - AllOf[BaseElementMatchType], - AtLeastN[ - Union[ - BaseElementMatchType, - DoNotCareSentinel, - OneOf[BaseElementMatchType], - AllOf[BaseElementMatchType], - ] - ], - AtMostN[ - Union[ - BaseElementMatchType, - DoNotCareSentinel, - OneOf[BaseElementMatchType], - AllOf[BaseElementMatchType], - ] - ], - ] - ], - DoNotCareSentinel, - MatchIfTrue[Sequence[cst.BaseElement]], - OneOf[ - Union[ - Sequence[ - Union[ - BaseElementMatchType, - OneOf[BaseElementMatchType], - AllOf[BaseElementMatchType], - AtLeastN[ - Union[ - BaseElementMatchType, - OneOf[BaseElementMatchType], - AllOf[BaseElementMatchType], - ] - ], - AtMostN[ - Union[ - BaseElementMatchType, - OneOf[BaseElementMatchType], - AllOf[BaseElementMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.BaseElement]], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - BaseElementMatchType, - OneOf[BaseElementMatchType], - AllOf[BaseElementMatchType], - AtLeastN[ - Union[ - BaseElementMatchType, - OneOf[BaseElementMatchType], - AllOf[BaseElementMatchType], - ] - ], - AtMostN[ - Union[ - BaseElementMatchType, - OneOf[BaseElementMatchType], - AllOf[BaseElementMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.BaseElement]], - ] - ], - ] = DoNotCare() - lbrace: Union[ - LeftCurlyBraceMatchType, - DoNotCareSentinel, - OneOf[LeftCurlyBraceMatchType], - AllOf[LeftCurlyBraceMatchType], - ] = DoNotCare() - rbrace: Union[ - RightCurlyBraceMatchType, - DoNotCareSentinel, - OneOf[RightCurlyBraceMatchType], - AllOf[RightCurlyBraceMatchType], - ] = DoNotCare() - lpar: Union[ - Sequence[ - Union[ - LeftParenMatchType, - DoNotCareSentinel, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - AtLeastN[ - Union[ - LeftParenMatchType, - DoNotCareSentinel, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - AtMostN[ - Union[ - LeftParenMatchType, - DoNotCareSentinel, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - ] - ], - DoNotCareSentinel, - MatchIfTrue[Sequence[cst.LeftParen]], - OneOf[ - Union[ - Sequence[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - AtLeastN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - AtMostN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.LeftParen]], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - AtLeastN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - AtMostN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.LeftParen]], - ] - ], - ] = DoNotCare() - rpar: Union[ - Sequence[ - Union[ - RightParenMatchType, - DoNotCareSentinel, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - AtLeastN[ - Union[ - RightParenMatchType, - DoNotCareSentinel, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - AtMostN[ - Union[ - RightParenMatchType, - DoNotCareSentinel, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - ] - ], - DoNotCareSentinel, - MatchIfTrue[Sequence[cst.RightParen]], - OneOf[ - Union[ - Sequence[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - AtLeastN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - AtMostN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.RightParen]], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - AtLeastN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - AtMostN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.RightParen]], - ] - ], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class SetComp(BaseComp, BaseExpression, BaseSet, BaseSimpleComp, BaseMatcherNode): - elt: Union[ - BaseExpressionMatchType, - DoNotCareSentinel, - OneOf[BaseExpressionMatchType], - AllOf[BaseExpressionMatchType], - ] = DoNotCare() - for_in: Union[ - CompForMatchType, - DoNotCareSentinel, - OneOf[CompForMatchType], - AllOf[CompForMatchType], - ] = DoNotCare() - lbrace: Union[ - LeftCurlyBraceMatchType, - DoNotCareSentinel, - OneOf[LeftCurlyBraceMatchType], - AllOf[LeftCurlyBraceMatchType], - ] = DoNotCare() - rbrace: Union[ - RightCurlyBraceMatchType, - DoNotCareSentinel, - OneOf[RightCurlyBraceMatchType], - AllOf[RightCurlyBraceMatchType], - ] = DoNotCare() - lpar: Union[ - Sequence[ - Union[ - LeftParenMatchType, - DoNotCareSentinel, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - AtLeastN[ - Union[ - LeftParenMatchType, - DoNotCareSentinel, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - AtMostN[ - Union[ - LeftParenMatchType, - DoNotCareSentinel, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - ] - ], - DoNotCareSentinel, - MatchIfTrue[Sequence[cst.LeftParen]], - OneOf[ - Union[ - Sequence[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - AtLeastN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - AtMostN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.LeftParen]], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - AtLeastN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - AtMostN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.LeftParen]], - ] - ], - ] = DoNotCare() - rpar: Union[ - Sequence[ - Union[ - RightParenMatchType, - DoNotCareSentinel, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - AtLeastN[ - Union[ - RightParenMatchType, - DoNotCareSentinel, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - AtMostN[ - Union[ - RightParenMatchType, - DoNotCareSentinel, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - ] - ], - DoNotCareSentinel, - MatchIfTrue[Sequence[cst.RightParen]], - OneOf[ - Union[ - Sequence[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - AtLeastN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - AtMostN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.RightParen]], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - AtLeastN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - AtMostN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.RightParen]], - ] - ], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -BaseSmallStatementMatchType = Union[ - "BaseSmallStatement", MetadataMatchType, MatchIfTrue[cst.BaseSmallStatement] -] - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class SimpleStatementLine(BaseStatement, BaseMatcherNode): - body: Union[ - Sequence[ - Union[ - BaseSmallStatementMatchType, - DoNotCareSentinel, - OneOf[BaseSmallStatementMatchType], - AllOf[BaseSmallStatementMatchType], - AtLeastN[ - Union[ - BaseSmallStatementMatchType, - DoNotCareSentinel, - OneOf[BaseSmallStatementMatchType], - AllOf[BaseSmallStatementMatchType], - ] - ], - AtMostN[ - Union[ - BaseSmallStatementMatchType, - DoNotCareSentinel, - OneOf[BaseSmallStatementMatchType], - AllOf[BaseSmallStatementMatchType], - ] - ], - ] - ], - DoNotCareSentinel, - MatchIfTrue[Sequence[cst.BaseSmallStatement]], - OneOf[ - Union[ - Sequence[ - Union[ - BaseSmallStatementMatchType, - OneOf[BaseSmallStatementMatchType], - AllOf[BaseSmallStatementMatchType], - AtLeastN[ - Union[ - BaseSmallStatementMatchType, - OneOf[BaseSmallStatementMatchType], - AllOf[BaseSmallStatementMatchType], - ] - ], - AtMostN[ - Union[ - BaseSmallStatementMatchType, - OneOf[BaseSmallStatementMatchType], - AllOf[BaseSmallStatementMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.BaseSmallStatement]], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - BaseSmallStatementMatchType, - OneOf[BaseSmallStatementMatchType], - AllOf[BaseSmallStatementMatchType], - AtLeastN[ - Union[ - BaseSmallStatementMatchType, - OneOf[BaseSmallStatementMatchType], - AllOf[BaseSmallStatementMatchType], - ] - ], - AtMostN[ - Union[ - BaseSmallStatementMatchType, - OneOf[BaseSmallStatementMatchType], - AllOf[BaseSmallStatementMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.BaseSmallStatement]], - ] - ], - ] = DoNotCare() - leading_lines: Union[ - Sequence[ - Union[ - EmptyLineMatchType, - DoNotCareSentinel, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - AtLeastN[ - Union[ - EmptyLineMatchType, - DoNotCareSentinel, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - AtMostN[ - Union[ - EmptyLineMatchType, - DoNotCareSentinel, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - ] - ], - DoNotCareSentinel, - MatchIfTrue[Sequence[cst.EmptyLine]], - OneOf[ - Union[ - Sequence[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - AtLeastN[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - AtMostN[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.EmptyLine]], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - AtLeastN[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - AtMostN[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.EmptyLine]], - ] - ], - ] = DoNotCare() - trailing_whitespace: Union[ - TrailingWhitespaceMatchType, - DoNotCareSentinel, - OneOf[TrailingWhitespaceMatchType], - AllOf[TrailingWhitespaceMatchType], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class SimpleStatementSuite(BaseSuite, BaseMatcherNode): - body: Union[ - Sequence[ - Union[ - BaseSmallStatementMatchType, - DoNotCareSentinel, - OneOf[BaseSmallStatementMatchType], - AllOf[BaseSmallStatementMatchType], - AtLeastN[ - Union[ - BaseSmallStatementMatchType, - DoNotCareSentinel, - OneOf[BaseSmallStatementMatchType], - AllOf[BaseSmallStatementMatchType], - ] - ], - AtMostN[ - Union[ - BaseSmallStatementMatchType, - DoNotCareSentinel, - OneOf[BaseSmallStatementMatchType], - AllOf[BaseSmallStatementMatchType], - ] - ], - ] - ], - DoNotCareSentinel, - MatchIfTrue[Sequence[cst.BaseSmallStatement]], - OneOf[ - Union[ - Sequence[ - Union[ - BaseSmallStatementMatchType, - OneOf[BaseSmallStatementMatchType], - AllOf[BaseSmallStatementMatchType], - AtLeastN[ - Union[ - BaseSmallStatementMatchType, - OneOf[BaseSmallStatementMatchType], - AllOf[BaseSmallStatementMatchType], - ] - ], - AtMostN[ - Union[ - BaseSmallStatementMatchType, - OneOf[BaseSmallStatementMatchType], - AllOf[BaseSmallStatementMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.BaseSmallStatement]], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - BaseSmallStatementMatchType, - OneOf[BaseSmallStatementMatchType], - AllOf[BaseSmallStatementMatchType], - AtLeastN[ - Union[ - BaseSmallStatementMatchType, - OneOf[BaseSmallStatementMatchType], - AllOf[BaseSmallStatementMatchType], - ] - ], - AtMostN[ - Union[ - BaseSmallStatementMatchType, - OneOf[BaseSmallStatementMatchType], - AllOf[BaseSmallStatementMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.BaseSmallStatement]], - ] - ], - ] = DoNotCare() - leading_whitespace: Union[ - SimpleWhitespaceMatchType, - DoNotCareSentinel, - OneOf[SimpleWhitespaceMatchType], - AllOf[SimpleWhitespaceMatchType], - ] = DoNotCare() - trailing_whitespace: Union[ - TrailingWhitespaceMatchType, - DoNotCareSentinel, - OneOf[TrailingWhitespaceMatchType], - AllOf[TrailingWhitespaceMatchType], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class SimpleString(BaseExpression, BaseString, BaseMatcherNode): - value: Union[ - strMatchType, DoNotCareSentinel, OneOf[strMatchType], AllOf[strMatchType] - ] = DoNotCare() - lpar: Union[ - Sequence[ - Union[ - LeftParenMatchType, - DoNotCareSentinel, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - AtLeastN[ - Union[ - LeftParenMatchType, - DoNotCareSentinel, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - AtMostN[ - Union[ - LeftParenMatchType, - DoNotCareSentinel, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - ] - ], - DoNotCareSentinel, - MatchIfTrue[Sequence[cst.LeftParen]], - OneOf[ - Union[ - Sequence[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - AtLeastN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - AtMostN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.LeftParen]], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - AtLeastN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - AtMostN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.LeftParen]], - ] - ], - ] = DoNotCare() - rpar: Union[ - Sequence[ - Union[ - RightParenMatchType, - DoNotCareSentinel, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - AtLeastN[ - Union[ - RightParenMatchType, - DoNotCareSentinel, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - AtMostN[ - Union[ - RightParenMatchType, - DoNotCareSentinel, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - ] - ], - DoNotCareSentinel, - MatchIfTrue[Sequence[cst.RightParen]], - OneOf[ - Union[ - Sequence[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - AtLeastN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - AtMostN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.RightParen]], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - AtLeastN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - AtMostN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.RightParen]], - ] - ], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class SimpleWhitespace(BaseParenthesizableWhitespace, BaseMatcherNode): - value: Union[ - strMatchType, DoNotCareSentinel, OneOf[strMatchType], AllOf[strMatchType] - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class Slice(BaseSlice, BaseMatcherNode): - lower: Union[ - Optional["BaseExpression"], - MetadataMatchType, - MatchIfTrue[Optional[cst.BaseExpression]], - DoNotCareSentinel, - OneOf[ - Union[ - Optional["BaseExpression"], - MetadataMatchType, - MatchIfTrue[Optional[cst.BaseExpression]], - ] - ], - AllOf[ - Union[ - Optional["BaseExpression"], - MetadataMatchType, - MatchIfTrue[Optional[cst.BaseExpression]], - ] - ], - ] = DoNotCare() - upper: Union[ - Optional["BaseExpression"], - MetadataMatchType, - MatchIfTrue[Optional[cst.BaseExpression]], - DoNotCareSentinel, - OneOf[ - Union[ - Optional["BaseExpression"], - MetadataMatchType, - MatchIfTrue[Optional[cst.BaseExpression]], - ] - ], - AllOf[ - Union[ - Optional["BaseExpression"], - MetadataMatchType, - MatchIfTrue[Optional[cst.BaseExpression]], - ] - ], - ] = DoNotCare() - step: Union[ - Optional["BaseExpression"], - MetadataMatchType, - MatchIfTrue[Optional[cst.BaseExpression]], - DoNotCareSentinel, - OneOf[ - Union[ - Optional["BaseExpression"], - MetadataMatchType, - MatchIfTrue[Optional[cst.BaseExpression]], - ] - ], - AllOf[ - Union[ - Optional["BaseExpression"], - MetadataMatchType, - MatchIfTrue[Optional[cst.BaseExpression]], - ] - ], - ] = DoNotCare() - first_colon: Union[ - ColonMatchType, DoNotCareSentinel, OneOf[ColonMatchType], AllOf[ColonMatchType] - ] = DoNotCare() - second_colon: Union[ - ColonMatchType, DoNotCareSentinel, OneOf[ColonMatchType], AllOf[ColonMatchType] - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class StarredDictElement(BaseDictElement, BaseMatcherNode): - value: Union[ - BaseExpressionMatchType, - DoNotCareSentinel, - OneOf[BaseExpressionMatchType], - AllOf[BaseExpressionMatchType], - ] = DoNotCare() - comma: Union[ - CommaMatchType, DoNotCareSentinel, OneOf[CommaMatchType], AllOf[CommaMatchType] - ] = DoNotCare() - whitespace_before_value: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class StarredElement(BaseElement, BaseExpression, BaseMatcherNode): - value: Union[ - BaseExpressionMatchType, - DoNotCareSentinel, - OneOf[BaseExpressionMatchType], - AllOf[BaseExpressionMatchType], - ] = DoNotCare() - comma: Union[ - CommaMatchType, DoNotCareSentinel, OneOf[CommaMatchType], AllOf[CommaMatchType] - ] = DoNotCare() - lpar: Union[ - Sequence[ - Union[ - LeftParenMatchType, - DoNotCareSentinel, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - AtLeastN[ - Union[ - LeftParenMatchType, - DoNotCareSentinel, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - AtMostN[ - Union[ - LeftParenMatchType, - DoNotCareSentinel, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - ] - ], - DoNotCareSentinel, - MatchIfTrue[Sequence[cst.LeftParen]], - OneOf[ - Union[ - Sequence[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - AtLeastN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - AtMostN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.LeftParen]], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - AtLeastN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - AtMostN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.LeftParen]], - ] - ], - ] = DoNotCare() - rpar: Union[ - Sequence[ - Union[ - RightParenMatchType, - DoNotCareSentinel, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - AtLeastN[ - Union[ - RightParenMatchType, - DoNotCareSentinel, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - AtMostN[ - Union[ - RightParenMatchType, - DoNotCareSentinel, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - ] - ], - DoNotCareSentinel, - MatchIfTrue[Sequence[cst.RightParen]], - OneOf[ - Union[ - Sequence[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - AtLeastN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - AtMostN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.RightParen]], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - AtLeastN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - AtMostN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.RightParen]], - ] - ], - ] = DoNotCare() - whitespace_before_value: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -SubscriptElementMatchType = Union[ - "SubscriptElement", MetadataMatchType, MatchIfTrue[cst.SubscriptElement] -] - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class Subscript( - BaseAssignTargetExpression, BaseDelTargetExpression, BaseExpression, BaseMatcherNode -): - value: Union[ - BaseExpressionMatchType, - DoNotCareSentinel, - OneOf[BaseExpressionMatchType], - AllOf[BaseExpressionMatchType], - ] = DoNotCare() - slice: Union[ - Sequence[ - Union[ - SubscriptElementMatchType, - DoNotCareSentinel, - OneOf[SubscriptElementMatchType], - AllOf[SubscriptElementMatchType], - AtLeastN[ - Union[ - SubscriptElementMatchType, - DoNotCareSentinel, - OneOf[SubscriptElementMatchType], - AllOf[SubscriptElementMatchType], - ] - ], - AtMostN[ - Union[ - SubscriptElementMatchType, - DoNotCareSentinel, - OneOf[SubscriptElementMatchType], - AllOf[SubscriptElementMatchType], - ] - ], - ] - ], - DoNotCareSentinel, - MatchIfTrue[Sequence[cst.SubscriptElement]], - OneOf[ - Union[ - Sequence[ - Union[ - SubscriptElementMatchType, - OneOf[SubscriptElementMatchType], - AllOf[SubscriptElementMatchType], - AtLeastN[ - Union[ - SubscriptElementMatchType, - OneOf[SubscriptElementMatchType], - AllOf[SubscriptElementMatchType], - ] - ], - AtMostN[ - Union[ - SubscriptElementMatchType, - OneOf[SubscriptElementMatchType], - AllOf[SubscriptElementMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.SubscriptElement]], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - SubscriptElementMatchType, - OneOf[SubscriptElementMatchType], - AllOf[SubscriptElementMatchType], - AtLeastN[ - Union[ - SubscriptElementMatchType, - OneOf[SubscriptElementMatchType], - AllOf[SubscriptElementMatchType], - ] - ], - AtMostN[ - Union[ - SubscriptElementMatchType, - OneOf[SubscriptElementMatchType], - AllOf[SubscriptElementMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.SubscriptElement]], - ] - ], - ] = DoNotCare() - lbracket: Union[ - LeftSquareBracketMatchType, - DoNotCareSentinel, - OneOf[LeftSquareBracketMatchType], - AllOf[LeftSquareBracketMatchType], - ] = DoNotCare() - rbracket: Union[ - RightSquareBracketMatchType, - DoNotCareSentinel, - OneOf[RightSquareBracketMatchType], - AllOf[RightSquareBracketMatchType], - ] = DoNotCare() - lpar: Union[ - Sequence[ - Union[ - LeftParenMatchType, - DoNotCareSentinel, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - AtLeastN[ - Union[ - LeftParenMatchType, - DoNotCareSentinel, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - AtMostN[ - Union[ - LeftParenMatchType, - DoNotCareSentinel, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - ] - ], - DoNotCareSentinel, - MatchIfTrue[Sequence[cst.LeftParen]], - OneOf[ - Union[ - Sequence[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - AtLeastN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - AtMostN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.LeftParen]], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - AtLeastN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - AtMostN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.LeftParen]], - ] - ], - ] = DoNotCare() - rpar: Union[ - Sequence[ - Union[ - RightParenMatchType, - DoNotCareSentinel, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - AtLeastN[ - Union[ - RightParenMatchType, - DoNotCareSentinel, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - AtMostN[ - Union[ - RightParenMatchType, - DoNotCareSentinel, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - ] - ], - DoNotCareSentinel, - MatchIfTrue[Sequence[cst.RightParen]], - OneOf[ - Union[ - Sequence[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - AtLeastN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - AtMostN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.RightParen]], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - AtLeastN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - AtMostN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.RightParen]], - ] - ], - ] = DoNotCare() - whitespace_after_value: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -BaseSliceMatchType = Union["BaseSlice", MetadataMatchType, MatchIfTrue[cst.BaseSlice]] - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class SubscriptElement(BaseMatcherNode): - slice: Union[ - BaseSliceMatchType, - DoNotCareSentinel, - OneOf[BaseSliceMatchType], - AllOf[BaseSliceMatchType], - ] = DoNotCare() - comma: Union[ - CommaMatchType, DoNotCareSentinel, OneOf[CommaMatchType], AllOf[CommaMatchType] - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class Subtract(BaseBinaryOp, BaseMatcherNode): - whitespace_before: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - whitespace_after: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class SubtractAssign(BaseAugOp, BaseMatcherNode): - whitespace_before: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - whitespace_after: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class TrailingWhitespace(BaseMatcherNode): - whitespace: Union[ - SimpleWhitespaceMatchType, - DoNotCareSentinel, - OneOf[SimpleWhitespaceMatchType], - AllOf[SimpleWhitespaceMatchType], - ] = DoNotCare() - comment: Union[ - Optional["Comment"], - MetadataMatchType, - MatchIfTrue[Optional[cst.Comment]], - DoNotCareSentinel, - OneOf[ - Union[ - Optional["Comment"], - MetadataMatchType, - MatchIfTrue[Optional[cst.Comment]], - ] - ], - AllOf[ - Union[ - Optional["Comment"], - MetadataMatchType, - MatchIfTrue[Optional[cst.Comment]], - ] - ], - ] = DoNotCare() - newline: Union[ - NewlineMatchType, - DoNotCareSentinel, - OneOf[NewlineMatchType], - AllOf[NewlineMatchType], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -ExceptHandlerMatchType = Union[ - "ExceptHandler", MetadataMatchType, MatchIfTrue[cst.ExceptHandler] -] - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class Try(BaseCompoundStatement, BaseStatement, BaseMatcherNode): - body: Union[ - BaseSuiteMatchType, - DoNotCareSentinel, - OneOf[BaseSuiteMatchType], - AllOf[BaseSuiteMatchType], - ] = DoNotCare() - handlers: Union[ - Sequence[ - Union[ - ExceptHandlerMatchType, - DoNotCareSentinel, - OneOf[ExceptHandlerMatchType], - AllOf[ExceptHandlerMatchType], - AtLeastN[ - Union[ - ExceptHandlerMatchType, - DoNotCareSentinel, - OneOf[ExceptHandlerMatchType], - AllOf[ExceptHandlerMatchType], - ] - ], - AtMostN[ - Union[ - ExceptHandlerMatchType, - DoNotCareSentinel, - OneOf[ExceptHandlerMatchType], - AllOf[ExceptHandlerMatchType], - ] - ], - ] - ], - DoNotCareSentinel, - MatchIfTrue[Sequence[cst.ExceptHandler]], - OneOf[ - Union[ - Sequence[ - Union[ - ExceptHandlerMatchType, - OneOf[ExceptHandlerMatchType], - AllOf[ExceptHandlerMatchType], - AtLeastN[ - Union[ - ExceptHandlerMatchType, - OneOf[ExceptHandlerMatchType], - AllOf[ExceptHandlerMatchType], - ] - ], - AtMostN[ - Union[ - ExceptHandlerMatchType, - OneOf[ExceptHandlerMatchType], - AllOf[ExceptHandlerMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.ExceptHandler]], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - ExceptHandlerMatchType, - OneOf[ExceptHandlerMatchType], - AllOf[ExceptHandlerMatchType], - AtLeastN[ - Union[ - ExceptHandlerMatchType, - OneOf[ExceptHandlerMatchType], - AllOf[ExceptHandlerMatchType], - ] - ], - AtMostN[ - Union[ - ExceptHandlerMatchType, - OneOf[ExceptHandlerMatchType], - AllOf[ExceptHandlerMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.ExceptHandler]], - ] - ], - ] = DoNotCare() - orelse: Union[ - Optional["Else"], - MetadataMatchType, - MatchIfTrue[Optional[cst.Else]], - DoNotCareSentinel, - OneOf[ - Union[Optional["Else"], MetadataMatchType, MatchIfTrue[Optional[cst.Else]]] - ], - AllOf[ - Union[Optional["Else"], MetadataMatchType, MatchIfTrue[Optional[cst.Else]]] - ], - ] = DoNotCare() - finalbody: Union[ - Optional["Finally"], - MetadataMatchType, - MatchIfTrue[Optional[cst.Finally]], - DoNotCareSentinel, - OneOf[ - Union[ - Optional["Finally"], - MetadataMatchType, - MatchIfTrue[Optional[cst.Finally]], - ] - ], - AllOf[ - Union[ - Optional["Finally"], - MetadataMatchType, - MatchIfTrue[Optional[cst.Finally]], - ] - ], - ] = DoNotCare() - leading_lines: Union[ - Sequence[ - Union[ - EmptyLineMatchType, - DoNotCareSentinel, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - AtLeastN[ - Union[ - EmptyLineMatchType, - DoNotCareSentinel, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - AtMostN[ - Union[ - EmptyLineMatchType, - DoNotCareSentinel, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - ] - ], - DoNotCareSentinel, - MatchIfTrue[Sequence[cst.EmptyLine]], - OneOf[ - Union[ - Sequence[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - AtLeastN[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - AtMostN[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.EmptyLine]], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - AtLeastN[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - AtMostN[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.EmptyLine]], - ] - ], - ] = DoNotCare() - whitespace_before_colon: Union[ - SimpleWhitespaceMatchType, - DoNotCareSentinel, - OneOf[SimpleWhitespaceMatchType], - AllOf[SimpleWhitespaceMatchType], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -ExceptStarHandlerMatchType = Union[ - "ExceptStarHandler", MetadataMatchType, MatchIfTrue[cst.ExceptStarHandler] -] - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class TryStar(BaseCompoundStatement, BaseStatement, BaseMatcherNode): - body: Union[ - BaseSuiteMatchType, - DoNotCareSentinel, - OneOf[BaseSuiteMatchType], - AllOf[BaseSuiteMatchType], - ] = DoNotCare() - handlers: Union[ - Sequence[ - Union[ - ExceptStarHandlerMatchType, - DoNotCareSentinel, - OneOf[ExceptStarHandlerMatchType], - AllOf[ExceptStarHandlerMatchType], - AtLeastN[ - Union[ - ExceptStarHandlerMatchType, - DoNotCareSentinel, - OneOf[ExceptStarHandlerMatchType], - AllOf[ExceptStarHandlerMatchType], - ] - ], - AtMostN[ - Union[ - ExceptStarHandlerMatchType, - DoNotCareSentinel, - OneOf[ExceptStarHandlerMatchType], - AllOf[ExceptStarHandlerMatchType], - ] - ], - ] - ], - DoNotCareSentinel, - MatchIfTrue[Sequence[cst.ExceptStarHandler]], - OneOf[ - Union[ - Sequence[ - Union[ - ExceptStarHandlerMatchType, - OneOf[ExceptStarHandlerMatchType], - AllOf[ExceptStarHandlerMatchType], - AtLeastN[ - Union[ - ExceptStarHandlerMatchType, - OneOf[ExceptStarHandlerMatchType], - AllOf[ExceptStarHandlerMatchType], - ] - ], - AtMostN[ - Union[ - ExceptStarHandlerMatchType, - OneOf[ExceptStarHandlerMatchType], - AllOf[ExceptStarHandlerMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.ExceptStarHandler]], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - ExceptStarHandlerMatchType, - OneOf[ExceptStarHandlerMatchType], - AllOf[ExceptStarHandlerMatchType], - AtLeastN[ - Union[ - ExceptStarHandlerMatchType, - OneOf[ExceptStarHandlerMatchType], - AllOf[ExceptStarHandlerMatchType], - ] - ], - AtMostN[ - Union[ - ExceptStarHandlerMatchType, - OneOf[ExceptStarHandlerMatchType], - AllOf[ExceptStarHandlerMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.ExceptStarHandler]], - ] - ], - ] = DoNotCare() - orelse: Union[ - Optional["Else"], - MetadataMatchType, - MatchIfTrue[Optional[cst.Else]], - DoNotCareSentinel, - OneOf[ - Union[Optional["Else"], MetadataMatchType, MatchIfTrue[Optional[cst.Else]]] - ], - AllOf[ - Union[Optional["Else"], MetadataMatchType, MatchIfTrue[Optional[cst.Else]]] - ], - ] = DoNotCare() - finalbody: Union[ - Optional["Finally"], - MetadataMatchType, - MatchIfTrue[Optional[cst.Finally]], - DoNotCareSentinel, - OneOf[ - Union[ - Optional["Finally"], - MetadataMatchType, - MatchIfTrue[Optional[cst.Finally]], - ] - ], - AllOf[ - Union[ - Optional["Finally"], - MetadataMatchType, - MatchIfTrue[Optional[cst.Finally]], - ] - ], - ] = DoNotCare() - leading_lines: Union[ - Sequence[ - Union[ - EmptyLineMatchType, - DoNotCareSentinel, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - AtLeastN[ - Union[ - EmptyLineMatchType, - DoNotCareSentinel, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - AtMostN[ - Union[ - EmptyLineMatchType, - DoNotCareSentinel, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - ] - ], - DoNotCareSentinel, - MatchIfTrue[Sequence[cst.EmptyLine]], - OneOf[ - Union[ - Sequence[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - AtLeastN[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - AtMostN[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.EmptyLine]], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - AtLeastN[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - AtMostN[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.EmptyLine]], - ] - ], - ] = DoNotCare() - whitespace_before_colon: Union[ - SimpleWhitespaceMatchType, - DoNotCareSentinel, - OneOf[SimpleWhitespaceMatchType], - AllOf[SimpleWhitespaceMatchType], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class Tuple( - BaseAssignTargetExpression, BaseDelTargetExpression, BaseExpression, BaseMatcherNode -): - elements: Union[ - Sequence[ - Union[ - BaseElementMatchType, - DoNotCareSentinel, - OneOf[BaseElementMatchType], - AllOf[BaseElementMatchType], - AtLeastN[ - Union[ - BaseElementMatchType, - DoNotCareSentinel, - OneOf[BaseElementMatchType], - AllOf[BaseElementMatchType], - ] - ], - AtMostN[ - Union[ - BaseElementMatchType, - DoNotCareSentinel, - OneOf[BaseElementMatchType], - AllOf[BaseElementMatchType], - ] - ], - ] - ], - DoNotCareSentinel, - MatchIfTrue[Sequence[cst.BaseElement]], - OneOf[ - Union[ - Sequence[ - Union[ - BaseElementMatchType, - OneOf[BaseElementMatchType], - AllOf[BaseElementMatchType], - AtLeastN[ - Union[ - BaseElementMatchType, - OneOf[BaseElementMatchType], - AllOf[BaseElementMatchType], - ] - ], - AtMostN[ - Union[ - BaseElementMatchType, - OneOf[BaseElementMatchType], - AllOf[BaseElementMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.BaseElement]], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - BaseElementMatchType, - OneOf[BaseElementMatchType], - AllOf[BaseElementMatchType], - AtLeastN[ - Union[ - BaseElementMatchType, - OneOf[BaseElementMatchType], - AllOf[BaseElementMatchType], - ] - ], - AtMostN[ - Union[ - BaseElementMatchType, - OneOf[BaseElementMatchType], - AllOf[BaseElementMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.BaseElement]], - ] - ], - ] = DoNotCare() - lpar: Union[ - Sequence[ - Union[ - LeftParenMatchType, - DoNotCareSentinel, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - AtLeastN[ - Union[ - LeftParenMatchType, - DoNotCareSentinel, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - AtMostN[ - Union[ - LeftParenMatchType, - DoNotCareSentinel, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - ] - ], - DoNotCareSentinel, - MatchIfTrue[Sequence[cst.LeftParen]], - OneOf[ - Union[ - Sequence[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - AtLeastN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - AtMostN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.LeftParen]], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - AtLeastN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - AtMostN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.LeftParen]], - ] - ], - ] = DoNotCare() - rpar: Union[ - Sequence[ - Union[ - RightParenMatchType, - DoNotCareSentinel, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - AtLeastN[ - Union[ - RightParenMatchType, - DoNotCareSentinel, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - AtMostN[ - Union[ - RightParenMatchType, - DoNotCareSentinel, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - ] - ], - DoNotCareSentinel, - MatchIfTrue[Sequence[cst.RightParen]], - OneOf[ - Union[ - Sequence[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - AtLeastN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - AtMostN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.RightParen]], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - AtLeastN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - AtMostN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.RightParen]], - ] - ], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class TypeAlias(BaseSmallStatement, BaseMatcherNode): - name: Union[ - NameMatchType, DoNotCareSentinel, OneOf[NameMatchType], AllOf[NameMatchType] - ] = DoNotCare() - value: Union[ - BaseExpressionMatchType, - DoNotCareSentinel, - OneOf[BaseExpressionMatchType], - AllOf[BaseExpressionMatchType], - ] = DoNotCare() - type_parameters: Union[ - Optional["TypeParameters"], - MetadataMatchType, - MatchIfTrue[Optional[cst.TypeParameters]], - DoNotCareSentinel, - OneOf[ - Union[ - Optional["TypeParameters"], - MetadataMatchType, - MatchIfTrue[Optional[cst.TypeParameters]], - ] - ], - AllOf[ - Union[ - Optional["TypeParameters"], - MetadataMatchType, - MatchIfTrue[Optional[cst.TypeParameters]], - ] - ], - ] = DoNotCare() - whitespace_after_type: Union[ - SimpleWhitespaceMatchType, - DoNotCareSentinel, - OneOf[SimpleWhitespaceMatchType], - AllOf[SimpleWhitespaceMatchType], - ] = DoNotCare() - whitespace_after_name: Union[ - SimpleWhitespaceMatchType, - DoNotCareSentinel, - OneOf[SimpleWhitespaceMatchType], - AllOf[SimpleWhitespaceMatchType], - ] = DoNotCare() - whitespace_after_type_parameters: Union[ - SimpleWhitespaceMatchType, - DoNotCareSentinel, - OneOf[SimpleWhitespaceMatchType], - AllOf[SimpleWhitespaceMatchType], - ] = DoNotCare() - whitespace_after_equals: Union[ - SimpleWhitespaceMatchType, - DoNotCareSentinel, - OneOf[SimpleWhitespaceMatchType], - AllOf[SimpleWhitespaceMatchType], - ] = DoNotCare() - semicolon: Union[ - SemicolonMatchType, - DoNotCareSentinel, - OneOf[SemicolonMatchType], - AllOf[SemicolonMatchType], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -TypeVarOrTypeVarTupleOrParamSpecMatchType = Union[ - "TypeVar", - "TypeVarTuple", - "ParamSpec", - MetadataMatchType, - MatchIfTrue[Union[cst.TypeVar, cst.TypeVarTuple, cst.ParamSpec]], -] - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class TypeParam(BaseMatcherNode): - param: Union[ - TypeVarOrTypeVarTupleOrParamSpecMatchType, - DoNotCareSentinel, - OneOf[TypeVarOrTypeVarTupleOrParamSpecMatchType], - AllOf[TypeVarOrTypeVarTupleOrParamSpecMatchType], - ] = DoNotCare() - comma: Union[ - CommaMatchType, DoNotCareSentinel, OneOf[CommaMatchType], AllOf[CommaMatchType] - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -TypeParamMatchType = Union["TypeParam", MetadataMatchType, MatchIfTrue[cst.TypeParam]] - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class TypeParameters(BaseMatcherNode): - params: Union[ - Sequence[ - Union[ - TypeParamMatchType, - DoNotCareSentinel, - OneOf[TypeParamMatchType], - AllOf[TypeParamMatchType], - AtLeastN[ - Union[ - TypeParamMatchType, - DoNotCareSentinel, - OneOf[TypeParamMatchType], - AllOf[TypeParamMatchType], - ] - ], - AtMostN[ - Union[ - TypeParamMatchType, - DoNotCareSentinel, - OneOf[TypeParamMatchType], - AllOf[TypeParamMatchType], - ] - ], - ] - ], - DoNotCareSentinel, - MatchIfTrue[Sequence[cst.TypeParam]], - OneOf[ - Union[ - Sequence[ - Union[ - TypeParamMatchType, - OneOf[TypeParamMatchType], - AllOf[TypeParamMatchType], - AtLeastN[ - Union[ - TypeParamMatchType, - OneOf[TypeParamMatchType], - AllOf[TypeParamMatchType], - ] - ], - AtMostN[ - Union[ - TypeParamMatchType, - OneOf[TypeParamMatchType], - AllOf[TypeParamMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.TypeParam]], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - TypeParamMatchType, - OneOf[TypeParamMatchType], - AllOf[TypeParamMatchType], - AtLeastN[ - Union[ - TypeParamMatchType, - OneOf[TypeParamMatchType], - AllOf[TypeParamMatchType], - ] - ], - AtMostN[ - Union[ - TypeParamMatchType, - OneOf[TypeParamMatchType], - AllOf[TypeParamMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.TypeParam]], - ] - ], - ] = DoNotCare() - lbracket: Union[ - LeftSquareBracketMatchType, - DoNotCareSentinel, - OneOf[LeftSquareBracketMatchType], - AllOf[LeftSquareBracketMatchType], - ] = DoNotCare() - rbracket: Union[ - RightSquareBracketMatchType, - DoNotCareSentinel, - OneOf[RightSquareBracketMatchType], - AllOf[RightSquareBracketMatchType], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class TypeVar(BaseMatcherNode): - name: Union[ - NameMatchType, DoNotCareSentinel, OneOf[NameMatchType], AllOf[NameMatchType] - ] = DoNotCare() - bound: Union[ - Optional["BaseExpression"], - MetadataMatchType, - MatchIfTrue[Optional[cst.BaseExpression]], - DoNotCareSentinel, - OneOf[ - Union[ - Optional["BaseExpression"], - MetadataMatchType, - MatchIfTrue[Optional[cst.BaseExpression]], - ] - ], - AllOf[ - Union[ - Optional["BaseExpression"], - MetadataMatchType, - MatchIfTrue[Optional[cst.BaseExpression]], - ] - ], - ] = DoNotCare() - colon: Union[ - ColonMatchType, DoNotCareSentinel, OneOf[ColonMatchType], AllOf[ColonMatchType] - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class TypeVarTuple(BaseMatcherNode): - name: Union[ - NameMatchType, DoNotCareSentinel, OneOf[NameMatchType], AllOf[NameMatchType] - ] = DoNotCare() - whitespace_after_star: Union[ - SimpleWhitespaceMatchType, - DoNotCareSentinel, - OneOf[SimpleWhitespaceMatchType], - AllOf[SimpleWhitespaceMatchType], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -BaseUnaryOpMatchType = Union[ - "BaseUnaryOp", MetadataMatchType, MatchIfTrue[cst.BaseUnaryOp] -] - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class UnaryOperation(BaseExpression, BaseMatcherNode): - operator: Union[ - BaseUnaryOpMatchType, - DoNotCareSentinel, - OneOf[BaseUnaryOpMatchType], - AllOf[BaseUnaryOpMatchType], - ] = DoNotCare() - expression: Union[ - BaseExpressionMatchType, - DoNotCareSentinel, - OneOf[BaseExpressionMatchType], - AllOf[BaseExpressionMatchType], - ] = DoNotCare() - lpar: Union[ - Sequence[ - Union[ - LeftParenMatchType, - DoNotCareSentinel, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - AtLeastN[ - Union[ - LeftParenMatchType, - DoNotCareSentinel, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - AtMostN[ - Union[ - LeftParenMatchType, - DoNotCareSentinel, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - ] - ], - DoNotCareSentinel, - MatchIfTrue[Sequence[cst.LeftParen]], - OneOf[ - Union[ - Sequence[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - AtLeastN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - AtMostN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.LeftParen]], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - AtLeastN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - AtMostN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.LeftParen]], - ] - ], - ] = DoNotCare() - rpar: Union[ - Sequence[ - Union[ - RightParenMatchType, - DoNotCareSentinel, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - AtLeastN[ - Union[ - RightParenMatchType, - DoNotCareSentinel, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - AtMostN[ - Union[ - RightParenMatchType, - DoNotCareSentinel, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - ] - ], - DoNotCareSentinel, - MatchIfTrue[Sequence[cst.RightParen]], - OneOf[ - Union[ - Sequence[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - AtLeastN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - AtMostN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.RightParen]], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - AtLeastN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - AtMostN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.RightParen]], - ] - ], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class While(BaseCompoundStatement, BaseStatement, BaseMatcherNode): - test: Union[ - BaseExpressionMatchType, - DoNotCareSentinel, - OneOf[BaseExpressionMatchType], - AllOf[BaseExpressionMatchType], - ] = DoNotCare() - body: Union[ - BaseSuiteMatchType, - DoNotCareSentinel, - OneOf[BaseSuiteMatchType], - AllOf[BaseSuiteMatchType], - ] = DoNotCare() - orelse: Union[ - Optional["Else"], - MetadataMatchType, - MatchIfTrue[Optional[cst.Else]], - DoNotCareSentinel, - OneOf[ - Union[Optional["Else"], MetadataMatchType, MatchIfTrue[Optional[cst.Else]]] - ], - AllOf[ - Union[Optional["Else"], MetadataMatchType, MatchIfTrue[Optional[cst.Else]]] - ], - ] = DoNotCare() - leading_lines: Union[ - Sequence[ - Union[ - EmptyLineMatchType, - DoNotCareSentinel, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - AtLeastN[ - Union[ - EmptyLineMatchType, - DoNotCareSentinel, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - AtMostN[ - Union[ - EmptyLineMatchType, - DoNotCareSentinel, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - ] - ], - DoNotCareSentinel, - MatchIfTrue[Sequence[cst.EmptyLine]], - OneOf[ - Union[ - Sequence[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - AtLeastN[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - AtMostN[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.EmptyLine]], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - AtLeastN[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - AtMostN[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.EmptyLine]], - ] - ], - ] = DoNotCare() - whitespace_after_while: Union[ - SimpleWhitespaceMatchType, - DoNotCareSentinel, - OneOf[SimpleWhitespaceMatchType], - AllOf[SimpleWhitespaceMatchType], - ] = DoNotCare() - whitespace_before_colon: Union[ - SimpleWhitespaceMatchType, - DoNotCareSentinel, - OneOf[SimpleWhitespaceMatchType], - AllOf[SimpleWhitespaceMatchType], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -WithItemMatchType = Union["WithItem", MetadataMatchType, MatchIfTrue[cst.WithItem]] - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class With(BaseCompoundStatement, BaseStatement, BaseMatcherNode): - items: Union[ - Sequence[ - Union[ - WithItemMatchType, - DoNotCareSentinel, - OneOf[WithItemMatchType], - AllOf[WithItemMatchType], - AtLeastN[ - Union[ - WithItemMatchType, - DoNotCareSentinel, - OneOf[WithItemMatchType], - AllOf[WithItemMatchType], - ] - ], - AtMostN[ - Union[ - WithItemMatchType, - DoNotCareSentinel, - OneOf[WithItemMatchType], - AllOf[WithItemMatchType], - ] - ], - ] - ], - DoNotCareSentinel, - MatchIfTrue[Sequence[cst.WithItem]], - OneOf[ - Union[ - Sequence[ - Union[ - WithItemMatchType, - OneOf[WithItemMatchType], - AllOf[WithItemMatchType], - AtLeastN[ - Union[ - WithItemMatchType, - OneOf[WithItemMatchType], - AllOf[WithItemMatchType], - ] - ], - AtMostN[ - Union[ - WithItemMatchType, - OneOf[WithItemMatchType], - AllOf[WithItemMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.WithItem]], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - WithItemMatchType, - OneOf[WithItemMatchType], - AllOf[WithItemMatchType], - AtLeastN[ - Union[ - WithItemMatchType, - OneOf[WithItemMatchType], - AllOf[WithItemMatchType], - ] - ], - AtMostN[ - Union[ - WithItemMatchType, - OneOf[WithItemMatchType], - AllOf[WithItemMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.WithItem]], - ] - ], - ] = DoNotCare() - body: Union[ - BaseSuiteMatchType, - DoNotCareSentinel, - OneOf[BaseSuiteMatchType], - AllOf[BaseSuiteMatchType], - ] = DoNotCare() - asynchronous: Union[ - Optional["Asynchronous"], - MetadataMatchType, - MatchIfTrue[Optional[cst.Asynchronous]], - DoNotCareSentinel, - OneOf[ - Union[ - Optional["Asynchronous"], - MetadataMatchType, - MatchIfTrue[Optional[cst.Asynchronous]], - ] - ], - AllOf[ - Union[ - Optional["Asynchronous"], - MetadataMatchType, - MatchIfTrue[Optional[cst.Asynchronous]], - ] - ], - ] = DoNotCare() - leading_lines: Union[ - Sequence[ - Union[ - EmptyLineMatchType, - DoNotCareSentinel, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - AtLeastN[ - Union[ - EmptyLineMatchType, - DoNotCareSentinel, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - AtMostN[ - Union[ - EmptyLineMatchType, - DoNotCareSentinel, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - ] - ], - DoNotCareSentinel, - MatchIfTrue[Sequence[cst.EmptyLine]], - OneOf[ - Union[ - Sequence[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - AtLeastN[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - AtMostN[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.EmptyLine]], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - AtLeastN[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - AtMostN[ - Union[ - EmptyLineMatchType, - OneOf[EmptyLineMatchType], - AllOf[EmptyLineMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.EmptyLine]], - ] - ], - ] = DoNotCare() - lpar: Union[ - LeftParenMatchType, - DoNotCareSentinel, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] = DoNotCare() - rpar: Union[ - RightParenMatchType, - DoNotCareSentinel, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] = DoNotCare() - whitespace_after_with: Union[ - SimpleWhitespaceMatchType, - DoNotCareSentinel, - OneOf[SimpleWhitespaceMatchType], - AllOf[SimpleWhitespaceMatchType], - ] = DoNotCare() - whitespace_before_colon: Union[ - SimpleWhitespaceMatchType, - DoNotCareSentinel, - OneOf[SimpleWhitespaceMatchType], - AllOf[SimpleWhitespaceMatchType], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class WithItem(BaseMatcherNode): - item: Union[ - BaseExpressionMatchType, - DoNotCareSentinel, - OneOf[BaseExpressionMatchType], - AllOf[BaseExpressionMatchType], - ] = DoNotCare() - asname: Union[ - Optional["AsName"], - MetadataMatchType, - MatchIfTrue[Optional[cst.AsName]], - DoNotCareSentinel, - OneOf[ - Union[ - Optional["AsName"], MetadataMatchType, MatchIfTrue[Optional[cst.AsName]] - ] - ], - AllOf[ - Union[ - Optional["AsName"], MetadataMatchType, MatchIfTrue[Optional[cst.AsName]] - ] - ], - ] = DoNotCare() - comma: Union[ - CommaMatchType, DoNotCareSentinel, OneOf[CommaMatchType], AllOf[CommaMatchType] - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -BaseExpressionOrFromOrNoneMatchType = Union[ - "BaseExpression", - "From", - None, - MetadataMatchType, - MatchIfTrue[Union[cst.BaseExpression, cst.From, None]], -] - - -@dataclass(frozen=True, eq=False, unsafe_hash=False) -class Yield(BaseExpression, BaseMatcherNode): - value: Union[ - BaseExpressionOrFromOrNoneMatchType, - DoNotCareSentinel, - OneOf[BaseExpressionOrFromOrNoneMatchType], - AllOf[BaseExpressionOrFromOrNoneMatchType], - ] = DoNotCare() - lpar: Union[ - Sequence[ - Union[ - LeftParenMatchType, - DoNotCareSentinel, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - AtLeastN[ - Union[ - LeftParenMatchType, - DoNotCareSentinel, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - AtMostN[ - Union[ - LeftParenMatchType, - DoNotCareSentinel, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - ] - ], - DoNotCareSentinel, - MatchIfTrue[Sequence[cst.LeftParen]], - OneOf[ - Union[ - Sequence[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - AtLeastN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - AtMostN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.LeftParen]], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - AtLeastN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - AtMostN[ - Union[ - LeftParenMatchType, - OneOf[LeftParenMatchType], - AllOf[LeftParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.LeftParen]], - ] - ], - ] = DoNotCare() - rpar: Union[ - Sequence[ - Union[ - RightParenMatchType, - DoNotCareSentinel, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - AtLeastN[ - Union[ - RightParenMatchType, - DoNotCareSentinel, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - AtMostN[ - Union[ - RightParenMatchType, - DoNotCareSentinel, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - ] - ], - DoNotCareSentinel, - MatchIfTrue[Sequence[cst.RightParen]], - OneOf[ - Union[ - Sequence[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - AtLeastN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - AtMostN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.RightParen]], - ] - ], - AllOf[ - Union[ - Sequence[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - AtLeastN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - AtMostN[ - Union[ - RightParenMatchType, - OneOf[RightParenMatchType], - AllOf[RightParenMatchType], - ] - ], - ] - ], - MatchIfTrue[Sequence[cst.RightParen]], - ] - ], - ] = DoNotCare() - whitespace_after_yield: Union[ - BaseParenthesizableWhitespaceMatchType, - DoNotCareSentinel, - OneOf[BaseParenthesizableWhitespaceMatchType], - AllOf[BaseParenthesizableWhitespaceMatchType], - ] = DoNotCare() - metadata: Union[ - MetadataMatchType, - DoNotCareSentinel, - OneOf[MetadataMatchType], - AllOf[MetadataMatchType], - ] = DoNotCare() - - -__all__ = [ - "Add", - "AddAssign", - "AllOf", - "And", - "AnnAssign", - "Annotation", - "Arg", - "AsName", - "Assert", - "Assign", - "AssignEqual", - "AssignTarget", - "Asynchronous", - "AtLeastN", - "AtMostN", - "Attribute", - "AugAssign", - "Await", - "BaseAssignTargetExpression", - "BaseAugOp", - "BaseBinaryOp", - "BaseBooleanOp", - "BaseComp", - "BaseCompOp", - "BaseCompoundStatement", - "BaseDelTargetExpression", - "BaseDict", - "BaseDictElement", - "BaseElement", - "BaseExpression", - "BaseFormattedStringContent", - "BaseList", - "BaseMatcherNode", - "BaseMetadataProvider", - "BaseNumber", - "BaseParenthesizableWhitespace", - "BaseSet", - "BaseSimpleComp", - "BaseSlice", - "BaseSmallStatement", - "BaseStatement", - "BaseString", - "BaseSuite", - "BaseUnaryOp", - "BinaryOperation", - "BitAnd", - "BitAndAssign", - "BitInvert", - "BitOr", - "BitOrAssign", - "BitXor", - "BitXorAssign", - "BooleanOperation", - "Break", - "Call", - "ClassDef", - "Colon", - "Comma", - "Comment", - "CompFor", - "CompIf", - "Comparison", - "ComparisonTarget", - "ConcatenatedString", - "Continue", - "Decorator", - "Del", - "Dict", - "DictComp", - "DictElement", - "Divide", - "DivideAssign", - "DoNotCare", - "DoNotCareSentinel", - "DoesNotMatch", - "Dot", - "Element", - "Ellipsis", - "Else", - "EmptyLine", - "Equal", - "ExceptHandler", - "ExceptStarHandler", - "Expr", - "Finally", - "Float", - "FloorDivide", - "FloorDivideAssign", - "For", - "FormattedString", - "FormattedStringExpression", - "FormattedStringText", - "From", - "FunctionDef", - "GeneratorExp", - "Global", - "GreaterThan", - "GreaterThanEqual", - "If", - "IfExp", - "Imaginary", - "Import", - "ImportAlias", - "ImportFrom", - "ImportStar", - "In", - "IndentedBlock", - "Index", - "Integer", - "Is", - "IsNot", - "Lambda", - "LeftCurlyBrace", - "LeftParen", - "LeftShift", - "LeftShiftAssign", - "LeftSquareBracket", - "LessThan", - "LessThanEqual", - "List", - "ListComp", - "Match", - "MatchAs", - "MatchCase", - "MatchClass", - "MatchDecoratorMismatch", - "MatchIfTrue", - "MatchKeywordElement", - "MatchList", - "MatchMapping", - "MatchMappingElement", - "MatchMetadata", - "MatchMetadataIfTrue", - "MatchOr", - "MatchOrElement", - "MatchPattern", - "MatchRegex", - "MatchSequence", - "MatchSequenceElement", - "MatchSingleton", - "MatchStar", - "MatchTuple", - "MatchValue", - "MatcherDecoratableTransformer", - "MatcherDecoratableVisitor", - "MatrixMultiply", - "MatrixMultiplyAssign", - "Minus", - "Module", - "Modulo", - "ModuloAssign", - "Multiply", - "MultiplyAssign", - "Name", - "NameItem", - "NamedExpr", - "Newline", - "Nonlocal", - "Not", - "NotEqual", - "NotIn", - "OneOf", - "Or", - "Param", - "ParamSlash", - "ParamSpec", - "ParamStar", - "Parameters", - "ParenthesizedWhitespace", - "Pass", - "Plus", - "Power", - "PowerAssign", - "Raise", - "Return", - "RightCurlyBrace", - "RightParen", - "RightShift", - "RightShiftAssign", - "RightSquareBracket", - "SaveMatchedNode", - "Semicolon", - "Set", - "SetComp", - "SimpleStatementLine", - "SimpleStatementSuite", - "SimpleString", - "SimpleWhitespace", - "Slice", - "StarredDictElement", - "StarredElement", - "Subscript", - "SubscriptElement", - "Subtract", - "SubtractAssign", - "TrailingWhitespace", - "Try", - "TryStar", - "Tuple", - "TypeAlias", - "TypeOf", - "TypeParam", - "TypeParameters", - "TypeVar", - "TypeVarTuple", - "UnaryOperation", - "While", - "With", - "WithItem", - "Yield", - "ZeroOrMore", - "ZeroOrOne", - "call_if_inside", - "call_if_not_inside", - "extract", - "extractall", - "findall", - "leave", - "matches", - "replace", - "visit", -] +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under the MIT license found in the +# LICENSE file in the root directory of this source tree. + + +# This file was generated by libcst.codegen.gen_matcher_classes +from dataclasses import dataclass +from typing import Optional, Sequence, Union + +from typing_extensions import Literal + +import libcst as cst +from libcst.matchers._decorators import call_if_inside, call_if_not_inside, leave, visit +from libcst.matchers._matcher_base import ( + AbstractBaseMatcherNodeMeta, + AllOf, + AtLeastN, + AtMostN, + BaseMatcherNode, + DoesNotMatch, + DoNotCare, + DoNotCareSentinel, + extract, + extractall, + findall, + matches, + MatchIfTrue, + MatchMetadata, + MatchMetadataIfTrue, + MatchRegex, + OneOf, + replace, + SaveMatchedNode, + TypeOf, + ZeroOrMore, + ZeroOrOne, +) +from libcst.matchers._visitors import ( + MatchDecoratorMismatch, + MatcherDecoratableTransformer, + MatcherDecoratableVisitor, +) + + +class _NodeABC(metaclass=AbstractBaseMatcherNodeMeta): + __slots__ = () + + +class BaseAssignTargetExpression(_NodeABC): + pass + + +class BaseAugOp(_NodeABC): + pass + + +class BaseBinaryOp(_NodeABC): + pass + + +class BaseBooleanOp(_NodeABC): + pass + + +class BaseComp(_NodeABC): + pass + + +class BaseCompOp(_NodeABC): + pass + + +class BaseCompoundStatement(_NodeABC): + pass + + +class BaseDelTargetExpression(_NodeABC): + pass + + +class BaseDict(_NodeABC): + pass + + +class BaseDictElement(_NodeABC): + pass + + +class BaseElement(_NodeABC): + pass + + +class BaseExpression(_NodeABC): + pass + + +class BaseFormattedStringContent(_NodeABC): + pass + + +class BaseList(_NodeABC): + pass + + +class BaseMetadataProvider(_NodeABC): + pass + + +class BaseNumber(_NodeABC): + pass + + +class BaseParenthesizableWhitespace(_NodeABC): + pass + + +class BaseSet(_NodeABC): + pass + + +class BaseSimpleComp(_NodeABC): + pass + + +class BaseSlice(_NodeABC): + pass + + +class BaseSmallStatement(_NodeABC): + pass + + +class BaseStatement(_NodeABC): + pass + + +class BaseString(_NodeABC): + pass + + +class BaseSuite(_NodeABC): + pass + + +class BaseUnaryOp(_NodeABC): + pass + + +MetadataMatchType = Union[MatchMetadata, MatchMetadataIfTrue] + + +BaseParenthesizableWhitespaceMatchType = Union[ + "BaseParenthesizableWhitespace", + MetadataMatchType, + MatchIfTrue[cst.BaseParenthesizableWhitespace], +] + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class Add(BaseBinaryOp, BaseMatcherNode): + whitespace_before: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + whitespace_after: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class AddAssign(BaseAugOp, BaseMatcherNode): + whitespace_before: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + whitespace_after: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class And(BaseBooleanOp, BaseMatcherNode): + whitespace_before: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + whitespace_after: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +BaseAssignTargetExpressionMatchType = Union[ + "BaseAssignTargetExpression", + MetadataMatchType, + MatchIfTrue[cst.BaseAssignTargetExpression], +] +AnnotationMatchType = Union[ + "Annotation", MetadataMatchType, MatchIfTrue[cst.Annotation] +] +AssignEqualMatchType = Union[ + "AssignEqual", MetadataMatchType, MatchIfTrue[cst.AssignEqual] +] +SemicolonMatchType = Union["Semicolon", MetadataMatchType, MatchIfTrue[cst.Semicolon]] + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class AnnAssign(BaseSmallStatement, BaseMatcherNode): + target: Union[ + BaseAssignTargetExpressionMatchType, + DoNotCareSentinel, + OneOf[BaseAssignTargetExpressionMatchType], + AllOf[BaseAssignTargetExpressionMatchType], + ] = DoNotCare() + annotation: Union[ + AnnotationMatchType, + DoNotCareSentinel, + OneOf[AnnotationMatchType], + AllOf[AnnotationMatchType], + ] = DoNotCare() + value: Union[ + Optional["BaseExpression"], + MetadataMatchType, + MatchIfTrue[Optional[cst.BaseExpression]], + DoNotCareSentinel, + OneOf[ + Union[ + Optional["BaseExpression"], + MetadataMatchType, + MatchIfTrue[Optional[cst.BaseExpression]], + ] + ], + AllOf[ + Union[ + Optional["BaseExpression"], + MetadataMatchType, + MatchIfTrue[Optional[cst.BaseExpression]], + ] + ], + ] = DoNotCare() + equal: Union[ + AssignEqualMatchType, + DoNotCareSentinel, + OneOf[AssignEqualMatchType], + AllOf[AssignEqualMatchType], + ] = DoNotCare() + semicolon: Union[ + SemicolonMatchType, + DoNotCareSentinel, + OneOf[SemicolonMatchType], + AllOf[SemicolonMatchType], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +BaseExpressionMatchType = Union[ + "BaseExpression", MetadataMatchType, MatchIfTrue[cst.BaseExpression] +] + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class Annotation(BaseMatcherNode): + annotation: Union[ + BaseExpressionMatchType, + DoNotCareSentinel, + OneOf[BaseExpressionMatchType], + AllOf[BaseExpressionMatchType], + ] = DoNotCare() + whitespace_before_indicator: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + whitespace_after_indicator: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +CommaMatchType = Union["Comma", MetadataMatchType, MatchIfTrue[cst.Comma]] + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class Arg(BaseMatcherNode): + value: Union[ + BaseExpressionMatchType, + DoNotCareSentinel, + OneOf[BaseExpressionMatchType], + AllOf[BaseExpressionMatchType], + ] = DoNotCare() + keyword: Union[ + Optional["Name"], + MetadataMatchType, + MatchIfTrue[Optional[cst.Name]], + DoNotCareSentinel, + OneOf[ + Union[Optional["Name"], MetadataMatchType, MatchIfTrue[Optional[cst.Name]]] + ], + AllOf[ + Union[Optional["Name"], MetadataMatchType, MatchIfTrue[Optional[cst.Name]]] + ], + ] = DoNotCare() + equal: Union[ + AssignEqualMatchType, + DoNotCareSentinel, + OneOf[AssignEqualMatchType], + AllOf[AssignEqualMatchType], + ] = DoNotCare() + comma: Union[ + CommaMatchType, DoNotCareSentinel, OneOf[CommaMatchType], AllOf[CommaMatchType] + ] = DoNotCare() + star: Union[ + Literal["", "*", "**"], + MetadataMatchType, + MatchIfTrue[Literal["", "*", "**"]], + DoNotCareSentinel, + OneOf[ + Union[ + Literal["", "*", "**"], + MetadataMatchType, + MatchIfTrue[Literal["", "*", "**"]], + ] + ], + AllOf[ + Union[ + Literal["", "*", "**"], + MetadataMatchType, + MatchIfTrue[Literal["", "*", "**"]], + ] + ], + ] = DoNotCare() + whitespace_after_star: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + whitespace_after_arg: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +NameOrTupleOrListMatchType = Union[ + "Name", + "Tuple", + "List", + MetadataMatchType, + MatchIfTrue[Union[cst.Name, cst.Tuple, cst.List]], +] + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class AsName(BaseMatcherNode): + name: Union[ + NameOrTupleOrListMatchType, + DoNotCareSentinel, + OneOf[NameOrTupleOrListMatchType], + AllOf[NameOrTupleOrListMatchType], + ] = DoNotCare() + whitespace_before_as: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + whitespace_after_as: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +SimpleWhitespaceMatchType = Union[ + "SimpleWhitespace", MetadataMatchType, MatchIfTrue[cst.SimpleWhitespace] +] + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class Assert(BaseSmallStatement, BaseMatcherNode): + test: Union[ + BaseExpressionMatchType, + DoNotCareSentinel, + OneOf[BaseExpressionMatchType], + AllOf[BaseExpressionMatchType], + ] = DoNotCare() + msg: Union[ + Optional["BaseExpression"], + MetadataMatchType, + MatchIfTrue[Optional[cst.BaseExpression]], + DoNotCareSentinel, + OneOf[ + Union[ + Optional["BaseExpression"], + MetadataMatchType, + MatchIfTrue[Optional[cst.BaseExpression]], + ] + ], + AllOf[ + Union[ + Optional["BaseExpression"], + MetadataMatchType, + MatchIfTrue[Optional[cst.BaseExpression]], + ] + ], + ] = DoNotCare() + comma: Union[ + CommaMatchType, DoNotCareSentinel, OneOf[CommaMatchType], AllOf[CommaMatchType] + ] = DoNotCare() + whitespace_after_assert: Union[ + SimpleWhitespaceMatchType, + DoNotCareSentinel, + OneOf[SimpleWhitespaceMatchType], + AllOf[SimpleWhitespaceMatchType], + ] = DoNotCare() + semicolon: Union[ + SemicolonMatchType, + DoNotCareSentinel, + OneOf[SemicolonMatchType], + AllOf[SemicolonMatchType], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +AssignTargetMatchType = Union[ + "AssignTarget", MetadataMatchType, MatchIfTrue[cst.AssignTarget] +] + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class Assign(BaseSmallStatement, BaseMatcherNode): + targets: Union[ + Sequence[ + Union[ + AssignTargetMatchType, + DoNotCareSentinel, + OneOf[AssignTargetMatchType], + AllOf[AssignTargetMatchType], + AtLeastN[ + Union[ + AssignTargetMatchType, + DoNotCareSentinel, + OneOf[AssignTargetMatchType], + AllOf[AssignTargetMatchType], + ] + ], + AtMostN[ + Union[ + AssignTargetMatchType, + DoNotCareSentinel, + OneOf[AssignTargetMatchType], + AllOf[AssignTargetMatchType], + ] + ], + ] + ], + DoNotCareSentinel, + MatchIfTrue[Sequence[cst.AssignTarget]], + OneOf[ + Union[ + Sequence[ + Union[ + AssignTargetMatchType, + OneOf[AssignTargetMatchType], + AllOf[AssignTargetMatchType], + AtLeastN[ + Union[ + AssignTargetMatchType, + OneOf[AssignTargetMatchType], + AllOf[AssignTargetMatchType], + ] + ], + AtMostN[ + Union[ + AssignTargetMatchType, + OneOf[AssignTargetMatchType], + AllOf[AssignTargetMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.AssignTarget]], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + AssignTargetMatchType, + OneOf[AssignTargetMatchType], + AllOf[AssignTargetMatchType], + AtLeastN[ + Union[ + AssignTargetMatchType, + OneOf[AssignTargetMatchType], + AllOf[AssignTargetMatchType], + ] + ], + AtMostN[ + Union[ + AssignTargetMatchType, + OneOf[AssignTargetMatchType], + AllOf[AssignTargetMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.AssignTarget]], + ] + ], + ] = DoNotCare() + value: Union[ + BaseExpressionMatchType, + DoNotCareSentinel, + OneOf[BaseExpressionMatchType], + AllOf[BaseExpressionMatchType], + ] = DoNotCare() + semicolon: Union[ + SemicolonMatchType, + DoNotCareSentinel, + OneOf[SemicolonMatchType], + AllOf[SemicolonMatchType], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class AssignEqual(BaseMatcherNode): + whitespace_before: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + whitespace_after: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class AssignTarget(BaseMatcherNode): + target: Union[ + BaseAssignTargetExpressionMatchType, + DoNotCareSentinel, + OneOf[BaseAssignTargetExpressionMatchType], + AllOf[BaseAssignTargetExpressionMatchType], + ] = DoNotCare() + whitespace_before_equal: Union[ + SimpleWhitespaceMatchType, + DoNotCareSentinel, + OneOf[SimpleWhitespaceMatchType], + AllOf[SimpleWhitespaceMatchType], + ] = DoNotCare() + whitespace_after_equal: Union[ + SimpleWhitespaceMatchType, + DoNotCareSentinel, + OneOf[SimpleWhitespaceMatchType], + AllOf[SimpleWhitespaceMatchType], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class Asynchronous(BaseMatcherNode): + whitespace_after: Union[ + SimpleWhitespaceMatchType, + DoNotCareSentinel, + OneOf[SimpleWhitespaceMatchType], + AllOf[SimpleWhitespaceMatchType], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +NameMatchType = Union["Name", MetadataMatchType, MatchIfTrue[cst.Name]] +DotMatchType = Union["Dot", MetadataMatchType, MatchIfTrue[cst.Dot]] +LeftParenMatchType = Union["LeftParen", MetadataMatchType, MatchIfTrue[cst.LeftParen]] +RightParenMatchType = Union[ + "RightParen", MetadataMatchType, MatchIfTrue[cst.RightParen] +] + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class Attribute( + BaseAssignTargetExpression, BaseDelTargetExpression, BaseExpression, BaseMatcherNode +): + value: Union[ + BaseExpressionMatchType, + DoNotCareSentinel, + OneOf[BaseExpressionMatchType], + AllOf[BaseExpressionMatchType], + ] = DoNotCare() + attr: Union[ + NameMatchType, DoNotCareSentinel, OneOf[NameMatchType], AllOf[NameMatchType] + ] = DoNotCare() + dot: Union[ + DotMatchType, DoNotCareSentinel, OneOf[DotMatchType], AllOf[DotMatchType] + ] = DoNotCare() + lpar: Union[ + Sequence[ + Union[ + LeftParenMatchType, + DoNotCareSentinel, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + AtLeastN[ + Union[ + LeftParenMatchType, + DoNotCareSentinel, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + AtMostN[ + Union[ + LeftParenMatchType, + DoNotCareSentinel, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + ] + ], + DoNotCareSentinel, + MatchIfTrue[Sequence[cst.LeftParen]], + OneOf[ + Union[ + Sequence[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + AtLeastN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + AtMostN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.LeftParen]], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + AtLeastN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + AtMostN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.LeftParen]], + ] + ], + ] = DoNotCare() + rpar: Union[ + Sequence[ + Union[ + RightParenMatchType, + DoNotCareSentinel, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + AtLeastN[ + Union[ + RightParenMatchType, + DoNotCareSentinel, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + AtMostN[ + Union[ + RightParenMatchType, + DoNotCareSentinel, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + ] + ], + DoNotCareSentinel, + MatchIfTrue[Sequence[cst.RightParen]], + OneOf[ + Union[ + Sequence[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + AtLeastN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + AtMostN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.RightParen]], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + AtLeastN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + AtMostN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.RightParen]], + ] + ], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +BaseAugOpMatchType = Union["BaseAugOp", MetadataMatchType, MatchIfTrue[cst.BaseAugOp]] + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class AugAssign(BaseSmallStatement, BaseMatcherNode): + target: Union[ + BaseAssignTargetExpressionMatchType, + DoNotCareSentinel, + OneOf[BaseAssignTargetExpressionMatchType], + AllOf[BaseAssignTargetExpressionMatchType], + ] = DoNotCare() + operator: Union[ + BaseAugOpMatchType, + DoNotCareSentinel, + OneOf[BaseAugOpMatchType], + AllOf[BaseAugOpMatchType], + ] = DoNotCare() + value: Union[ + BaseExpressionMatchType, + DoNotCareSentinel, + OneOf[BaseExpressionMatchType], + AllOf[BaseExpressionMatchType], + ] = DoNotCare() + semicolon: Union[ + SemicolonMatchType, + DoNotCareSentinel, + OneOf[SemicolonMatchType], + AllOf[SemicolonMatchType], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class Await(BaseExpression, BaseMatcherNode): + expression: Union[ + BaseExpressionMatchType, + DoNotCareSentinel, + OneOf[BaseExpressionMatchType], + AllOf[BaseExpressionMatchType], + ] = DoNotCare() + lpar: Union[ + Sequence[ + Union[ + LeftParenMatchType, + DoNotCareSentinel, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + AtLeastN[ + Union[ + LeftParenMatchType, + DoNotCareSentinel, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + AtMostN[ + Union[ + LeftParenMatchType, + DoNotCareSentinel, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + ] + ], + DoNotCareSentinel, + MatchIfTrue[Sequence[cst.LeftParen]], + OneOf[ + Union[ + Sequence[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + AtLeastN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + AtMostN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.LeftParen]], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + AtLeastN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + AtMostN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.LeftParen]], + ] + ], + ] = DoNotCare() + rpar: Union[ + Sequence[ + Union[ + RightParenMatchType, + DoNotCareSentinel, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + AtLeastN[ + Union[ + RightParenMatchType, + DoNotCareSentinel, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + AtMostN[ + Union[ + RightParenMatchType, + DoNotCareSentinel, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + ] + ], + DoNotCareSentinel, + MatchIfTrue[Sequence[cst.RightParen]], + OneOf[ + Union[ + Sequence[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + AtLeastN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + AtMostN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.RightParen]], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + AtLeastN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + AtMostN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.RightParen]], + ] + ], + ] = DoNotCare() + whitespace_after_await: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +BaseBinaryOpMatchType = Union[ + "BaseBinaryOp", MetadataMatchType, MatchIfTrue[cst.BaseBinaryOp] +] + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class BinaryOperation(BaseExpression, BaseMatcherNode): + left: Union[ + BaseExpressionMatchType, + DoNotCareSentinel, + OneOf[BaseExpressionMatchType], + AllOf[BaseExpressionMatchType], + ] = DoNotCare() + operator: Union[ + BaseBinaryOpMatchType, + DoNotCareSentinel, + OneOf[BaseBinaryOpMatchType], + AllOf[BaseBinaryOpMatchType], + ] = DoNotCare() + right: Union[ + BaseExpressionMatchType, + DoNotCareSentinel, + OneOf[BaseExpressionMatchType], + AllOf[BaseExpressionMatchType], + ] = DoNotCare() + lpar: Union[ + Sequence[ + Union[ + LeftParenMatchType, + DoNotCareSentinel, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + AtLeastN[ + Union[ + LeftParenMatchType, + DoNotCareSentinel, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + AtMostN[ + Union[ + LeftParenMatchType, + DoNotCareSentinel, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + ] + ], + DoNotCareSentinel, + MatchIfTrue[Sequence[cst.LeftParen]], + OneOf[ + Union[ + Sequence[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + AtLeastN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + AtMostN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.LeftParen]], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + AtLeastN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + AtMostN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.LeftParen]], + ] + ], + ] = DoNotCare() + rpar: Union[ + Sequence[ + Union[ + RightParenMatchType, + DoNotCareSentinel, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + AtLeastN[ + Union[ + RightParenMatchType, + DoNotCareSentinel, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + AtMostN[ + Union[ + RightParenMatchType, + DoNotCareSentinel, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + ] + ], + DoNotCareSentinel, + MatchIfTrue[Sequence[cst.RightParen]], + OneOf[ + Union[ + Sequence[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + AtLeastN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + AtMostN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.RightParen]], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + AtLeastN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + AtMostN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.RightParen]], + ] + ], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class BitAnd(BaseBinaryOp, BaseMatcherNode): + whitespace_before: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + whitespace_after: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class BitAndAssign(BaseAugOp, BaseMatcherNode): + whitespace_before: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + whitespace_after: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class BitInvert(BaseUnaryOp, BaseMatcherNode): + whitespace_after: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class BitOr(BaseBinaryOp, BaseMatcherNode): + whitespace_before: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + whitespace_after: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class BitOrAssign(BaseAugOp, BaseMatcherNode): + whitespace_before: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + whitespace_after: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class BitXor(BaseBinaryOp, BaseMatcherNode): + whitespace_before: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + whitespace_after: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class BitXorAssign(BaseAugOp, BaseMatcherNode): + whitespace_before: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + whitespace_after: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +BaseBooleanOpMatchType = Union[ + "BaseBooleanOp", MetadataMatchType, MatchIfTrue[cst.BaseBooleanOp] +] + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class BooleanOperation(BaseExpression, BaseMatcherNode): + left: Union[ + BaseExpressionMatchType, + DoNotCareSentinel, + OneOf[BaseExpressionMatchType], + AllOf[BaseExpressionMatchType], + ] = DoNotCare() + operator: Union[ + BaseBooleanOpMatchType, + DoNotCareSentinel, + OneOf[BaseBooleanOpMatchType], + AllOf[BaseBooleanOpMatchType], + ] = DoNotCare() + right: Union[ + BaseExpressionMatchType, + DoNotCareSentinel, + OneOf[BaseExpressionMatchType], + AllOf[BaseExpressionMatchType], + ] = DoNotCare() + lpar: Union[ + Sequence[ + Union[ + LeftParenMatchType, + DoNotCareSentinel, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + AtLeastN[ + Union[ + LeftParenMatchType, + DoNotCareSentinel, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + AtMostN[ + Union[ + LeftParenMatchType, + DoNotCareSentinel, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + ] + ], + DoNotCareSentinel, + MatchIfTrue[Sequence[cst.LeftParen]], + OneOf[ + Union[ + Sequence[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + AtLeastN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + AtMostN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.LeftParen]], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + AtLeastN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + AtMostN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.LeftParen]], + ] + ], + ] = DoNotCare() + rpar: Union[ + Sequence[ + Union[ + RightParenMatchType, + DoNotCareSentinel, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + AtLeastN[ + Union[ + RightParenMatchType, + DoNotCareSentinel, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + AtMostN[ + Union[ + RightParenMatchType, + DoNotCareSentinel, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + ] + ], + DoNotCareSentinel, + MatchIfTrue[Sequence[cst.RightParen]], + OneOf[ + Union[ + Sequence[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + AtLeastN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + AtMostN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.RightParen]], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + AtLeastN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + AtMostN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.RightParen]], + ] + ], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class Break(BaseSmallStatement, BaseMatcherNode): + semicolon: Union[ + SemicolonMatchType, + DoNotCareSentinel, + OneOf[SemicolonMatchType], + AllOf[SemicolonMatchType], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +ArgMatchType = Union["Arg", MetadataMatchType, MatchIfTrue[cst.Arg]] + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class Call(BaseExpression, BaseMatcherNode): + func: Union[ + BaseExpressionMatchType, + DoNotCareSentinel, + OneOf[BaseExpressionMatchType], + AllOf[BaseExpressionMatchType], + ] = DoNotCare() + args: Union[ + Sequence[ + Union[ + ArgMatchType, + DoNotCareSentinel, + OneOf[ArgMatchType], + AllOf[ArgMatchType], + AtLeastN[ + Union[ + ArgMatchType, + DoNotCareSentinel, + OneOf[ArgMatchType], + AllOf[ArgMatchType], + ] + ], + AtMostN[ + Union[ + ArgMatchType, + DoNotCareSentinel, + OneOf[ArgMatchType], + AllOf[ArgMatchType], + ] + ], + ] + ], + DoNotCareSentinel, + MatchIfTrue[Sequence[cst.Arg]], + OneOf[ + Union[ + Sequence[ + Union[ + ArgMatchType, + OneOf[ArgMatchType], + AllOf[ArgMatchType], + AtLeastN[ + Union[ + ArgMatchType, OneOf[ArgMatchType], AllOf[ArgMatchType] + ] + ], + AtMostN[ + Union[ + ArgMatchType, OneOf[ArgMatchType], AllOf[ArgMatchType] + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.Arg]], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + ArgMatchType, + OneOf[ArgMatchType], + AllOf[ArgMatchType], + AtLeastN[ + Union[ + ArgMatchType, OneOf[ArgMatchType], AllOf[ArgMatchType] + ] + ], + AtMostN[ + Union[ + ArgMatchType, OneOf[ArgMatchType], AllOf[ArgMatchType] + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.Arg]], + ] + ], + ] = DoNotCare() + lpar: Union[ + Sequence[ + Union[ + LeftParenMatchType, + DoNotCareSentinel, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + AtLeastN[ + Union[ + LeftParenMatchType, + DoNotCareSentinel, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + AtMostN[ + Union[ + LeftParenMatchType, + DoNotCareSentinel, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + ] + ], + DoNotCareSentinel, + MatchIfTrue[Sequence[cst.LeftParen]], + OneOf[ + Union[ + Sequence[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + AtLeastN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + AtMostN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.LeftParen]], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + AtLeastN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + AtMostN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.LeftParen]], + ] + ], + ] = DoNotCare() + rpar: Union[ + Sequence[ + Union[ + RightParenMatchType, + DoNotCareSentinel, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + AtLeastN[ + Union[ + RightParenMatchType, + DoNotCareSentinel, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + AtMostN[ + Union[ + RightParenMatchType, + DoNotCareSentinel, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + ] + ], + DoNotCareSentinel, + MatchIfTrue[Sequence[cst.RightParen]], + OneOf[ + Union[ + Sequence[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + AtLeastN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + AtMostN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.RightParen]], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + AtLeastN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + AtMostN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.RightParen]], + ] + ], + ] = DoNotCare() + whitespace_after_func: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + whitespace_before_args: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +BaseSuiteMatchType = Union["BaseSuite", MetadataMatchType, MatchIfTrue[cst.BaseSuite]] +DecoratorMatchType = Union["Decorator", MetadataMatchType, MatchIfTrue[cst.Decorator]] +EmptyLineMatchType = Union["EmptyLine", MetadataMatchType, MatchIfTrue[cst.EmptyLine]] + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class ClassDef(BaseCompoundStatement, BaseStatement, BaseMatcherNode): + name: Union[ + NameMatchType, DoNotCareSentinel, OneOf[NameMatchType], AllOf[NameMatchType] + ] = DoNotCare() + body: Union[ + BaseSuiteMatchType, + DoNotCareSentinel, + OneOf[BaseSuiteMatchType], + AllOf[BaseSuiteMatchType], + ] = DoNotCare() + bases: Union[ + Sequence[ + Union[ + ArgMatchType, + DoNotCareSentinel, + OneOf[ArgMatchType], + AllOf[ArgMatchType], + AtLeastN[ + Union[ + ArgMatchType, + DoNotCareSentinel, + OneOf[ArgMatchType], + AllOf[ArgMatchType], + ] + ], + AtMostN[ + Union[ + ArgMatchType, + DoNotCareSentinel, + OneOf[ArgMatchType], + AllOf[ArgMatchType], + ] + ], + ] + ], + DoNotCareSentinel, + MatchIfTrue[Sequence[cst.Arg]], + OneOf[ + Union[ + Sequence[ + Union[ + ArgMatchType, + OneOf[ArgMatchType], + AllOf[ArgMatchType], + AtLeastN[ + Union[ + ArgMatchType, OneOf[ArgMatchType], AllOf[ArgMatchType] + ] + ], + AtMostN[ + Union[ + ArgMatchType, OneOf[ArgMatchType], AllOf[ArgMatchType] + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.Arg]], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + ArgMatchType, + OneOf[ArgMatchType], + AllOf[ArgMatchType], + AtLeastN[ + Union[ + ArgMatchType, OneOf[ArgMatchType], AllOf[ArgMatchType] + ] + ], + AtMostN[ + Union[ + ArgMatchType, OneOf[ArgMatchType], AllOf[ArgMatchType] + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.Arg]], + ] + ], + ] = DoNotCare() + keywords: Union[ + Sequence[ + Union[ + ArgMatchType, + DoNotCareSentinel, + OneOf[ArgMatchType], + AllOf[ArgMatchType], + AtLeastN[ + Union[ + ArgMatchType, + DoNotCareSentinel, + OneOf[ArgMatchType], + AllOf[ArgMatchType], + ] + ], + AtMostN[ + Union[ + ArgMatchType, + DoNotCareSentinel, + OneOf[ArgMatchType], + AllOf[ArgMatchType], + ] + ], + ] + ], + DoNotCareSentinel, + MatchIfTrue[Sequence[cst.Arg]], + OneOf[ + Union[ + Sequence[ + Union[ + ArgMatchType, + OneOf[ArgMatchType], + AllOf[ArgMatchType], + AtLeastN[ + Union[ + ArgMatchType, OneOf[ArgMatchType], AllOf[ArgMatchType] + ] + ], + AtMostN[ + Union[ + ArgMatchType, OneOf[ArgMatchType], AllOf[ArgMatchType] + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.Arg]], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + ArgMatchType, + OneOf[ArgMatchType], + AllOf[ArgMatchType], + AtLeastN[ + Union[ + ArgMatchType, OneOf[ArgMatchType], AllOf[ArgMatchType] + ] + ], + AtMostN[ + Union[ + ArgMatchType, OneOf[ArgMatchType], AllOf[ArgMatchType] + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.Arg]], + ] + ], + ] = DoNotCare() + decorators: Union[ + Sequence[ + Union[ + DecoratorMatchType, + DoNotCareSentinel, + OneOf[DecoratorMatchType], + AllOf[DecoratorMatchType], + AtLeastN[ + Union[ + DecoratorMatchType, + DoNotCareSentinel, + OneOf[DecoratorMatchType], + AllOf[DecoratorMatchType], + ] + ], + AtMostN[ + Union[ + DecoratorMatchType, + DoNotCareSentinel, + OneOf[DecoratorMatchType], + AllOf[DecoratorMatchType], + ] + ], + ] + ], + DoNotCareSentinel, + MatchIfTrue[Sequence[cst.Decorator]], + OneOf[ + Union[ + Sequence[ + Union[ + DecoratorMatchType, + OneOf[DecoratorMatchType], + AllOf[DecoratorMatchType], + AtLeastN[ + Union[ + DecoratorMatchType, + OneOf[DecoratorMatchType], + AllOf[DecoratorMatchType], + ] + ], + AtMostN[ + Union[ + DecoratorMatchType, + OneOf[DecoratorMatchType], + AllOf[DecoratorMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.Decorator]], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + DecoratorMatchType, + OneOf[DecoratorMatchType], + AllOf[DecoratorMatchType], + AtLeastN[ + Union[ + DecoratorMatchType, + OneOf[DecoratorMatchType], + AllOf[DecoratorMatchType], + ] + ], + AtMostN[ + Union[ + DecoratorMatchType, + OneOf[DecoratorMatchType], + AllOf[DecoratorMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.Decorator]], + ] + ], + ] = DoNotCare() + lpar: Union[ + LeftParenMatchType, + DoNotCareSentinel, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] = DoNotCare() + rpar: Union[ + RightParenMatchType, + DoNotCareSentinel, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] = DoNotCare() + leading_lines: Union[ + Sequence[ + Union[ + EmptyLineMatchType, + DoNotCareSentinel, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + AtLeastN[ + Union[ + EmptyLineMatchType, + DoNotCareSentinel, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + AtMostN[ + Union[ + EmptyLineMatchType, + DoNotCareSentinel, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + ] + ], + DoNotCareSentinel, + MatchIfTrue[Sequence[cst.EmptyLine]], + OneOf[ + Union[ + Sequence[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + AtLeastN[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + AtMostN[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.EmptyLine]], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + AtLeastN[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + AtMostN[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.EmptyLine]], + ] + ], + ] = DoNotCare() + lines_after_decorators: Union[ + Sequence[ + Union[ + EmptyLineMatchType, + DoNotCareSentinel, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + AtLeastN[ + Union[ + EmptyLineMatchType, + DoNotCareSentinel, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + AtMostN[ + Union[ + EmptyLineMatchType, + DoNotCareSentinel, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + ] + ], + DoNotCareSentinel, + MatchIfTrue[Sequence[cst.EmptyLine]], + OneOf[ + Union[ + Sequence[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + AtLeastN[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + AtMostN[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.EmptyLine]], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + AtLeastN[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + AtMostN[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.EmptyLine]], + ] + ], + ] = DoNotCare() + whitespace_after_class: Union[ + SimpleWhitespaceMatchType, + DoNotCareSentinel, + OneOf[SimpleWhitespaceMatchType], + AllOf[SimpleWhitespaceMatchType], + ] = DoNotCare() + whitespace_after_name: Union[ + SimpleWhitespaceMatchType, + DoNotCareSentinel, + OneOf[SimpleWhitespaceMatchType], + AllOf[SimpleWhitespaceMatchType], + ] = DoNotCare() + whitespace_before_colon: Union[ + SimpleWhitespaceMatchType, + DoNotCareSentinel, + OneOf[SimpleWhitespaceMatchType], + AllOf[SimpleWhitespaceMatchType], + ] = DoNotCare() + type_parameters: Union[ + Optional["TypeParameters"], + MetadataMatchType, + MatchIfTrue[Optional[cst.TypeParameters]], + DoNotCareSentinel, + OneOf[ + Union[ + Optional["TypeParameters"], + MetadataMatchType, + MatchIfTrue[Optional[cst.TypeParameters]], + ] + ], + AllOf[ + Union[ + Optional["TypeParameters"], + MetadataMatchType, + MatchIfTrue[Optional[cst.TypeParameters]], + ] + ], + ] = DoNotCare() + whitespace_after_type_parameters: Union[ + SimpleWhitespaceMatchType, + DoNotCareSentinel, + OneOf[SimpleWhitespaceMatchType], + AllOf[SimpleWhitespaceMatchType], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class Colon(BaseMatcherNode): + whitespace_before: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + whitespace_after: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class Comma(BaseMatcherNode): + whitespace_before: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + whitespace_after: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +strMatchType = Union[str, MetadataMatchType, MatchIfTrue[str]] + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class Comment(BaseMatcherNode): + value: Union[ + strMatchType, DoNotCareSentinel, OneOf[strMatchType], AllOf[strMatchType] + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +CompIfMatchType = Union["CompIf", MetadataMatchType, MatchIfTrue[cst.CompIf]] + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class CompFor(BaseMatcherNode): + target: Union[ + BaseAssignTargetExpressionMatchType, + DoNotCareSentinel, + OneOf[BaseAssignTargetExpressionMatchType], + AllOf[BaseAssignTargetExpressionMatchType], + ] = DoNotCare() + iter: Union[ + BaseExpressionMatchType, + DoNotCareSentinel, + OneOf[BaseExpressionMatchType], + AllOf[BaseExpressionMatchType], + ] = DoNotCare() + ifs: Union[ + Sequence[ + Union[ + CompIfMatchType, + DoNotCareSentinel, + OneOf[CompIfMatchType], + AllOf[CompIfMatchType], + AtLeastN[ + Union[ + CompIfMatchType, + DoNotCareSentinel, + OneOf[CompIfMatchType], + AllOf[CompIfMatchType], + ] + ], + AtMostN[ + Union[ + CompIfMatchType, + DoNotCareSentinel, + OneOf[CompIfMatchType], + AllOf[CompIfMatchType], + ] + ], + ] + ], + DoNotCareSentinel, + MatchIfTrue[Sequence[cst.CompIf]], + OneOf[ + Union[ + Sequence[ + Union[ + CompIfMatchType, + OneOf[CompIfMatchType], + AllOf[CompIfMatchType], + AtLeastN[ + Union[ + CompIfMatchType, + OneOf[CompIfMatchType], + AllOf[CompIfMatchType], + ] + ], + AtMostN[ + Union[ + CompIfMatchType, + OneOf[CompIfMatchType], + AllOf[CompIfMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.CompIf]], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + CompIfMatchType, + OneOf[CompIfMatchType], + AllOf[CompIfMatchType], + AtLeastN[ + Union[ + CompIfMatchType, + OneOf[CompIfMatchType], + AllOf[CompIfMatchType], + ] + ], + AtMostN[ + Union[ + CompIfMatchType, + OneOf[CompIfMatchType], + AllOf[CompIfMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.CompIf]], + ] + ], + ] = DoNotCare() + inner_for_in: Union[ + Optional["CompFor"], + MetadataMatchType, + MatchIfTrue[Optional[cst.CompFor]], + DoNotCareSentinel, + OneOf[ + Union[ + Optional["CompFor"], + MetadataMatchType, + MatchIfTrue[Optional[cst.CompFor]], + ] + ], + AllOf[ + Union[ + Optional["CompFor"], + MetadataMatchType, + MatchIfTrue[Optional[cst.CompFor]], + ] + ], + ] = DoNotCare() + asynchronous: Union[ + Optional["Asynchronous"], + MetadataMatchType, + MatchIfTrue[Optional[cst.Asynchronous]], + DoNotCareSentinel, + OneOf[ + Union[ + Optional["Asynchronous"], + MetadataMatchType, + MatchIfTrue[Optional[cst.Asynchronous]], + ] + ], + AllOf[ + Union[ + Optional["Asynchronous"], + MetadataMatchType, + MatchIfTrue[Optional[cst.Asynchronous]], + ] + ], + ] = DoNotCare() + whitespace_before: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + whitespace_after_for: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + whitespace_before_in: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + whitespace_after_in: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class CompIf(BaseMatcherNode): + test: Union[ + BaseExpressionMatchType, + DoNotCareSentinel, + OneOf[BaseExpressionMatchType], + AllOf[BaseExpressionMatchType], + ] = DoNotCare() + whitespace_before: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + whitespace_before_test: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +ComparisonTargetMatchType = Union[ + "ComparisonTarget", MetadataMatchType, MatchIfTrue[cst.ComparisonTarget] +] + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class Comparison(BaseExpression, BaseMatcherNode): + left: Union[ + BaseExpressionMatchType, + DoNotCareSentinel, + OneOf[BaseExpressionMatchType], + AllOf[BaseExpressionMatchType], + ] = DoNotCare() + comparisons: Union[ + Sequence[ + Union[ + ComparisonTargetMatchType, + DoNotCareSentinel, + OneOf[ComparisonTargetMatchType], + AllOf[ComparisonTargetMatchType], + AtLeastN[ + Union[ + ComparisonTargetMatchType, + DoNotCareSentinel, + OneOf[ComparisonTargetMatchType], + AllOf[ComparisonTargetMatchType], + ] + ], + AtMostN[ + Union[ + ComparisonTargetMatchType, + DoNotCareSentinel, + OneOf[ComparisonTargetMatchType], + AllOf[ComparisonTargetMatchType], + ] + ], + ] + ], + DoNotCareSentinel, + MatchIfTrue[Sequence[cst.ComparisonTarget]], + OneOf[ + Union[ + Sequence[ + Union[ + ComparisonTargetMatchType, + OneOf[ComparisonTargetMatchType], + AllOf[ComparisonTargetMatchType], + AtLeastN[ + Union[ + ComparisonTargetMatchType, + OneOf[ComparisonTargetMatchType], + AllOf[ComparisonTargetMatchType], + ] + ], + AtMostN[ + Union[ + ComparisonTargetMatchType, + OneOf[ComparisonTargetMatchType], + AllOf[ComparisonTargetMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.ComparisonTarget]], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + ComparisonTargetMatchType, + OneOf[ComparisonTargetMatchType], + AllOf[ComparisonTargetMatchType], + AtLeastN[ + Union[ + ComparisonTargetMatchType, + OneOf[ComparisonTargetMatchType], + AllOf[ComparisonTargetMatchType], + ] + ], + AtMostN[ + Union[ + ComparisonTargetMatchType, + OneOf[ComparisonTargetMatchType], + AllOf[ComparisonTargetMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.ComparisonTarget]], + ] + ], + ] = DoNotCare() + lpar: Union[ + Sequence[ + Union[ + LeftParenMatchType, + DoNotCareSentinel, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + AtLeastN[ + Union[ + LeftParenMatchType, + DoNotCareSentinel, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + AtMostN[ + Union[ + LeftParenMatchType, + DoNotCareSentinel, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + ] + ], + DoNotCareSentinel, + MatchIfTrue[Sequence[cst.LeftParen]], + OneOf[ + Union[ + Sequence[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + AtLeastN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + AtMostN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.LeftParen]], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + AtLeastN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + AtMostN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.LeftParen]], + ] + ], + ] = DoNotCare() + rpar: Union[ + Sequence[ + Union[ + RightParenMatchType, + DoNotCareSentinel, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + AtLeastN[ + Union[ + RightParenMatchType, + DoNotCareSentinel, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + AtMostN[ + Union[ + RightParenMatchType, + DoNotCareSentinel, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + ] + ], + DoNotCareSentinel, + MatchIfTrue[Sequence[cst.RightParen]], + OneOf[ + Union[ + Sequence[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + AtLeastN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + AtMostN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.RightParen]], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + AtLeastN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + AtMostN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.RightParen]], + ] + ], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +BaseCompOpMatchType = Union[ + "BaseCompOp", MetadataMatchType, MatchIfTrue[cst.BaseCompOp] +] + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class ComparisonTarget(BaseMatcherNode): + operator: Union[ + BaseCompOpMatchType, + DoNotCareSentinel, + OneOf[BaseCompOpMatchType], + AllOf[BaseCompOpMatchType], + ] = DoNotCare() + comparator: Union[ + BaseExpressionMatchType, + DoNotCareSentinel, + OneOf[BaseExpressionMatchType], + AllOf[BaseExpressionMatchType], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +SimpleStringOrFormattedStringMatchType = Union[ + "SimpleString", + "FormattedString", + MetadataMatchType, + MatchIfTrue[Union[cst.SimpleString, cst.FormattedString]], +] +SimpleStringOrFormattedStringOrConcatenatedStringMatchType = Union[ + "SimpleString", + "FormattedString", + "ConcatenatedString", + MetadataMatchType, + MatchIfTrue[Union[cst.SimpleString, cst.FormattedString, cst.ConcatenatedString]], +] + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class ConcatenatedString(BaseExpression, BaseString, BaseMatcherNode): + left: Union[ + SimpleStringOrFormattedStringMatchType, + DoNotCareSentinel, + OneOf[SimpleStringOrFormattedStringMatchType], + AllOf[SimpleStringOrFormattedStringMatchType], + ] = DoNotCare() + right: Union[ + SimpleStringOrFormattedStringOrConcatenatedStringMatchType, + DoNotCareSentinel, + OneOf[SimpleStringOrFormattedStringOrConcatenatedStringMatchType], + AllOf[SimpleStringOrFormattedStringOrConcatenatedStringMatchType], + ] = DoNotCare() + lpar: Union[ + Sequence[ + Union[ + LeftParenMatchType, + DoNotCareSentinel, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + AtLeastN[ + Union[ + LeftParenMatchType, + DoNotCareSentinel, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + AtMostN[ + Union[ + LeftParenMatchType, + DoNotCareSentinel, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + ] + ], + DoNotCareSentinel, + MatchIfTrue[Sequence[cst.LeftParen]], + OneOf[ + Union[ + Sequence[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + AtLeastN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + AtMostN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.LeftParen]], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + AtLeastN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + AtMostN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.LeftParen]], + ] + ], + ] = DoNotCare() + rpar: Union[ + Sequence[ + Union[ + RightParenMatchType, + DoNotCareSentinel, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + AtLeastN[ + Union[ + RightParenMatchType, + DoNotCareSentinel, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + AtMostN[ + Union[ + RightParenMatchType, + DoNotCareSentinel, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + ] + ], + DoNotCareSentinel, + MatchIfTrue[Sequence[cst.RightParen]], + OneOf[ + Union[ + Sequence[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + AtLeastN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + AtMostN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.RightParen]], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + AtLeastN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + AtMostN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.RightParen]], + ] + ], + ] = DoNotCare() + whitespace_between: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class Continue(BaseSmallStatement, BaseMatcherNode): + semicolon: Union[ + SemicolonMatchType, + DoNotCareSentinel, + OneOf[SemicolonMatchType], + AllOf[SemicolonMatchType], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +TrailingWhitespaceMatchType = Union[ + "TrailingWhitespace", MetadataMatchType, MatchIfTrue[cst.TrailingWhitespace] +] + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class Decorator(BaseMatcherNode): + decorator: Union[ + BaseExpressionMatchType, + DoNotCareSentinel, + OneOf[BaseExpressionMatchType], + AllOf[BaseExpressionMatchType], + ] = DoNotCare() + leading_lines: Union[ + Sequence[ + Union[ + EmptyLineMatchType, + DoNotCareSentinel, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + AtLeastN[ + Union[ + EmptyLineMatchType, + DoNotCareSentinel, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + AtMostN[ + Union[ + EmptyLineMatchType, + DoNotCareSentinel, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + ] + ], + DoNotCareSentinel, + MatchIfTrue[Sequence[cst.EmptyLine]], + OneOf[ + Union[ + Sequence[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + AtLeastN[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + AtMostN[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.EmptyLine]], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + AtLeastN[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + AtMostN[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.EmptyLine]], + ] + ], + ] = DoNotCare() + whitespace_after_at: Union[ + SimpleWhitespaceMatchType, + DoNotCareSentinel, + OneOf[SimpleWhitespaceMatchType], + AllOf[SimpleWhitespaceMatchType], + ] = DoNotCare() + trailing_whitespace: Union[ + TrailingWhitespaceMatchType, + DoNotCareSentinel, + OneOf[TrailingWhitespaceMatchType], + AllOf[TrailingWhitespaceMatchType], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +BaseDelTargetExpressionMatchType = Union[ + "BaseDelTargetExpression", + MetadataMatchType, + MatchIfTrue[cst.BaseDelTargetExpression], +] + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class Del(BaseSmallStatement, BaseMatcherNode): + target: Union[ + BaseDelTargetExpressionMatchType, + DoNotCareSentinel, + OneOf[BaseDelTargetExpressionMatchType], + AllOf[BaseDelTargetExpressionMatchType], + ] = DoNotCare() + whitespace_after_del: Union[ + SimpleWhitespaceMatchType, + DoNotCareSentinel, + OneOf[SimpleWhitespaceMatchType], + AllOf[SimpleWhitespaceMatchType], + ] = DoNotCare() + semicolon: Union[ + SemicolonMatchType, + DoNotCareSentinel, + OneOf[SemicolonMatchType], + AllOf[SemicolonMatchType], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +BaseDictElementMatchType = Union[ + "BaseDictElement", MetadataMatchType, MatchIfTrue[cst.BaseDictElement] +] +LeftCurlyBraceMatchType = Union[ + "LeftCurlyBrace", MetadataMatchType, MatchIfTrue[cst.LeftCurlyBrace] +] +RightCurlyBraceMatchType = Union[ + "RightCurlyBrace", MetadataMatchType, MatchIfTrue[cst.RightCurlyBrace] +] + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class Dict(BaseDict, BaseExpression, BaseMatcherNode): + elements: Union[ + Sequence[ + Union[ + BaseDictElementMatchType, + DoNotCareSentinel, + OneOf[BaseDictElementMatchType], + AllOf[BaseDictElementMatchType], + AtLeastN[ + Union[ + BaseDictElementMatchType, + DoNotCareSentinel, + OneOf[BaseDictElementMatchType], + AllOf[BaseDictElementMatchType], + ] + ], + AtMostN[ + Union[ + BaseDictElementMatchType, + DoNotCareSentinel, + OneOf[BaseDictElementMatchType], + AllOf[BaseDictElementMatchType], + ] + ], + ] + ], + DoNotCareSentinel, + MatchIfTrue[Sequence[cst.BaseDictElement]], + OneOf[ + Union[ + Sequence[ + Union[ + BaseDictElementMatchType, + OneOf[BaseDictElementMatchType], + AllOf[BaseDictElementMatchType], + AtLeastN[ + Union[ + BaseDictElementMatchType, + OneOf[BaseDictElementMatchType], + AllOf[BaseDictElementMatchType], + ] + ], + AtMostN[ + Union[ + BaseDictElementMatchType, + OneOf[BaseDictElementMatchType], + AllOf[BaseDictElementMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.BaseDictElement]], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + BaseDictElementMatchType, + OneOf[BaseDictElementMatchType], + AllOf[BaseDictElementMatchType], + AtLeastN[ + Union[ + BaseDictElementMatchType, + OneOf[BaseDictElementMatchType], + AllOf[BaseDictElementMatchType], + ] + ], + AtMostN[ + Union[ + BaseDictElementMatchType, + OneOf[BaseDictElementMatchType], + AllOf[BaseDictElementMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.BaseDictElement]], + ] + ], + ] = DoNotCare() + lbrace: Union[ + LeftCurlyBraceMatchType, + DoNotCareSentinel, + OneOf[LeftCurlyBraceMatchType], + AllOf[LeftCurlyBraceMatchType], + ] = DoNotCare() + rbrace: Union[ + RightCurlyBraceMatchType, + DoNotCareSentinel, + OneOf[RightCurlyBraceMatchType], + AllOf[RightCurlyBraceMatchType], + ] = DoNotCare() + lpar: Union[ + Sequence[ + Union[ + LeftParenMatchType, + DoNotCareSentinel, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + AtLeastN[ + Union[ + LeftParenMatchType, + DoNotCareSentinel, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + AtMostN[ + Union[ + LeftParenMatchType, + DoNotCareSentinel, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + ] + ], + DoNotCareSentinel, + MatchIfTrue[Sequence[cst.LeftParen]], + OneOf[ + Union[ + Sequence[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + AtLeastN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + AtMostN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.LeftParen]], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + AtLeastN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + AtMostN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.LeftParen]], + ] + ], + ] = DoNotCare() + rpar: Union[ + Sequence[ + Union[ + RightParenMatchType, + DoNotCareSentinel, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + AtLeastN[ + Union[ + RightParenMatchType, + DoNotCareSentinel, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + AtMostN[ + Union[ + RightParenMatchType, + DoNotCareSentinel, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + ] + ], + DoNotCareSentinel, + MatchIfTrue[Sequence[cst.RightParen]], + OneOf[ + Union[ + Sequence[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + AtLeastN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + AtMostN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.RightParen]], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + AtLeastN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + AtMostN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.RightParen]], + ] + ], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +CompForMatchType = Union["CompFor", MetadataMatchType, MatchIfTrue[cst.CompFor]] + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class DictComp(BaseComp, BaseDict, BaseExpression, BaseMatcherNode): + key: Union[ + BaseExpressionMatchType, + DoNotCareSentinel, + OneOf[BaseExpressionMatchType], + AllOf[BaseExpressionMatchType], + ] = DoNotCare() + value: Union[ + BaseExpressionMatchType, + DoNotCareSentinel, + OneOf[BaseExpressionMatchType], + AllOf[BaseExpressionMatchType], + ] = DoNotCare() + for_in: Union[ + CompForMatchType, + DoNotCareSentinel, + OneOf[CompForMatchType], + AllOf[CompForMatchType], + ] = DoNotCare() + lbrace: Union[ + LeftCurlyBraceMatchType, + DoNotCareSentinel, + OneOf[LeftCurlyBraceMatchType], + AllOf[LeftCurlyBraceMatchType], + ] = DoNotCare() + rbrace: Union[ + RightCurlyBraceMatchType, + DoNotCareSentinel, + OneOf[RightCurlyBraceMatchType], + AllOf[RightCurlyBraceMatchType], + ] = DoNotCare() + lpar: Union[ + Sequence[ + Union[ + LeftParenMatchType, + DoNotCareSentinel, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + AtLeastN[ + Union[ + LeftParenMatchType, + DoNotCareSentinel, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + AtMostN[ + Union[ + LeftParenMatchType, + DoNotCareSentinel, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + ] + ], + DoNotCareSentinel, + MatchIfTrue[Sequence[cst.LeftParen]], + OneOf[ + Union[ + Sequence[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + AtLeastN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + AtMostN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.LeftParen]], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + AtLeastN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + AtMostN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.LeftParen]], + ] + ], + ] = DoNotCare() + rpar: Union[ + Sequence[ + Union[ + RightParenMatchType, + DoNotCareSentinel, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + AtLeastN[ + Union[ + RightParenMatchType, + DoNotCareSentinel, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + AtMostN[ + Union[ + RightParenMatchType, + DoNotCareSentinel, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + ] + ], + DoNotCareSentinel, + MatchIfTrue[Sequence[cst.RightParen]], + OneOf[ + Union[ + Sequence[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + AtLeastN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + AtMostN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.RightParen]], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + AtLeastN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + AtMostN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.RightParen]], + ] + ], + ] = DoNotCare() + whitespace_before_colon: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + whitespace_after_colon: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class DictElement(BaseDictElement, BaseMatcherNode): + key: Union[ + BaseExpressionMatchType, + DoNotCareSentinel, + OneOf[BaseExpressionMatchType], + AllOf[BaseExpressionMatchType], + ] = DoNotCare() + value: Union[ + BaseExpressionMatchType, + DoNotCareSentinel, + OneOf[BaseExpressionMatchType], + AllOf[BaseExpressionMatchType], + ] = DoNotCare() + comma: Union[ + CommaMatchType, DoNotCareSentinel, OneOf[CommaMatchType], AllOf[CommaMatchType] + ] = DoNotCare() + whitespace_before_colon: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + whitespace_after_colon: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class Divide(BaseBinaryOp, BaseMatcherNode): + whitespace_before: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + whitespace_after: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class DivideAssign(BaseAugOp, BaseMatcherNode): + whitespace_before: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + whitespace_after: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class Dot(BaseMatcherNode): + whitespace_before: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + whitespace_after: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class Element(BaseElement, BaseMatcherNode): + value: Union[ + BaseExpressionMatchType, + DoNotCareSentinel, + OneOf[BaseExpressionMatchType], + AllOf[BaseExpressionMatchType], + ] = DoNotCare() + comma: Union[ + CommaMatchType, DoNotCareSentinel, OneOf[CommaMatchType], AllOf[CommaMatchType] + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class Ellipsis(BaseExpression, BaseMatcherNode): + lpar: Union[ + Sequence[ + Union[ + LeftParenMatchType, + DoNotCareSentinel, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + AtLeastN[ + Union[ + LeftParenMatchType, + DoNotCareSentinel, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + AtMostN[ + Union[ + LeftParenMatchType, + DoNotCareSentinel, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + ] + ], + DoNotCareSentinel, + MatchIfTrue[Sequence[cst.LeftParen]], + OneOf[ + Union[ + Sequence[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + AtLeastN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + AtMostN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.LeftParen]], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + AtLeastN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + AtMostN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.LeftParen]], + ] + ], + ] = DoNotCare() + rpar: Union[ + Sequence[ + Union[ + RightParenMatchType, + DoNotCareSentinel, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + AtLeastN[ + Union[ + RightParenMatchType, + DoNotCareSentinel, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + AtMostN[ + Union[ + RightParenMatchType, + DoNotCareSentinel, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + ] + ], + DoNotCareSentinel, + MatchIfTrue[Sequence[cst.RightParen]], + OneOf[ + Union[ + Sequence[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + AtLeastN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + AtMostN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.RightParen]], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + AtLeastN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + AtMostN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.RightParen]], + ] + ], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class Else(BaseMatcherNode): + body: Union[ + BaseSuiteMatchType, + DoNotCareSentinel, + OneOf[BaseSuiteMatchType], + AllOf[BaseSuiteMatchType], + ] = DoNotCare() + leading_lines: Union[ + Sequence[ + Union[ + EmptyLineMatchType, + DoNotCareSentinel, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + AtLeastN[ + Union[ + EmptyLineMatchType, + DoNotCareSentinel, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + AtMostN[ + Union[ + EmptyLineMatchType, + DoNotCareSentinel, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + ] + ], + DoNotCareSentinel, + MatchIfTrue[Sequence[cst.EmptyLine]], + OneOf[ + Union[ + Sequence[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + AtLeastN[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + AtMostN[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.EmptyLine]], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + AtLeastN[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + AtMostN[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.EmptyLine]], + ] + ], + ] = DoNotCare() + whitespace_before_colon: Union[ + SimpleWhitespaceMatchType, + DoNotCareSentinel, + OneOf[SimpleWhitespaceMatchType], + AllOf[SimpleWhitespaceMatchType], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +boolMatchType = Union[bool, MetadataMatchType, MatchIfTrue[bool]] +NewlineMatchType = Union["Newline", MetadataMatchType, MatchIfTrue[cst.Newline]] + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class EmptyLine(BaseMatcherNode): + indent: Union[ + boolMatchType, DoNotCareSentinel, OneOf[boolMatchType], AllOf[boolMatchType] + ] = DoNotCare() + whitespace: Union[ + SimpleWhitespaceMatchType, + DoNotCareSentinel, + OneOf[SimpleWhitespaceMatchType], + AllOf[SimpleWhitespaceMatchType], + ] = DoNotCare() + comment: Union[ + Optional["Comment"], + MetadataMatchType, + MatchIfTrue[Optional[cst.Comment]], + DoNotCareSentinel, + OneOf[ + Union[ + Optional["Comment"], + MetadataMatchType, + MatchIfTrue[Optional[cst.Comment]], + ] + ], + AllOf[ + Union[ + Optional["Comment"], + MetadataMatchType, + MatchIfTrue[Optional[cst.Comment]], + ] + ], + ] = DoNotCare() + newline: Union[ + NewlineMatchType, + DoNotCareSentinel, + OneOf[NewlineMatchType], + AllOf[NewlineMatchType], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class Equal(BaseCompOp, BaseMatcherNode): + whitespace_before: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + whitespace_after: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class ExceptHandler(BaseMatcherNode): + body: Union[ + BaseSuiteMatchType, + DoNotCareSentinel, + OneOf[BaseSuiteMatchType], + AllOf[BaseSuiteMatchType], + ] = DoNotCare() + type: Union[ + Optional["BaseExpression"], + MetadataMatchType, + MatchIfTrue[Optional[cst.BaseExpression]], + DoNotCareSentinel, + OneOf[ + Union[ + Optional["BaseExpression"], + MetadataMatchType, + MatchIfTrue[Optional[cst.BaseExpression]], + ] + ], + AllOf[ + Union[ + Optional["BaseExpression"], + MetadataMatchType, + MatchIfTrue[Optional[cst.BaseExpression]], + ] + ], + ] = DoNotCare() + name: Union[ + Optional["AsName"], + MetadataMatchType, + MatchIfTrue[Optional[cst.AsName]], + DoNotCareSentinel, + OneOf[ + Union[ + Optional["AsName"], MetadataMatchType, MatchIfTrue[Optional[cst.AsName]] + ] + ], + AllOf[ + Union[ + Optional["AsName"], MetadataMatchType, MatchIfTrue[Optional[cst.AsName]] + ] + ], + ] = DoNotCare() + leading_lines: Union[ + Sequence[ + Union[ + EmptyLineMatchType, + DoNotCareSentinel, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + AtLeastN[ + Union[ + EmptyLineMatchType, + DoNotCareSentinel, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + AtMostN[ + Union[ + EmptyLineMatchType, + DoNotCareSentinel, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + ] + ], + DoNotCareSentinel, + MatchIfTrue[Sequence[cst.EmptyLine]], + OneOf[ + Union[ + Sequence[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + AtLeastN[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + AtMostN[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.EmptyLine]], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + AtLeastN[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + AtMostN[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.EmptyLine]], + ] + ], + ] = DoNotCare() + whitespace_after_except: Union[ + SimpleWhitespaceMatchType, + DoNotCareSentinel, + OneOf[SimpleWhitespaceMatchType], + AllOf[SimpleWhitespaceMatchType], + ] = DoNotCare() + whitespace_before_colon: Union[ + SimpleWhitespaceMatchType, + DoNotCareSentinel, + OneOf[SimpleWhitespaceMatchType], + AllOf[SimpleWhitespaceMatchType], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class ExceptStarHandler(BaseMatcherNode): + body: Union[ + BaseSuiteMatchType, + DoNotCareSentinel, + OneOf[BaseSuiteMatchType], + AllOf[BaseSuiteMatchType], + ] = DoNotCare() + type: Union[ + BaseExpressionMatchType, + DoNotCareSentinel, + OneOf[BaseExpressionMatchType], + AllOf[BaseExpressionMatchType], + ] = DoNotCare() + name: Union[ + Optional["AsName"], + MetadataMatchType, + MatchIfTrue[Optional[cst.AsName]], + DoNotCareSentinel, + OneOf[ + Union[ + Optional["AsName"], MetadataMatchType, MatchIfTrue[Optional[cst.AsName]] + ] + ], + AllOf[ + Union[ + Optional["AsName"], MetadataMatchType, MatchIfTrue[Optional[cst.AsName]] + ] + ], + ] = DoNotCare() + leading_lines: Union[ + Sequence[ + Union[ + EmptyLineMatchType, + DoNotCareSentinel, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + AtLeastN[ + Union[ + EmptyLineMatchType, + DoNotCareSentinel, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + AtMostN[ + Union[ + EmptyLineMatchType, + DoNotCareSentinel, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + ] + ], + DoNotCareSentinel, + MatchIfTrue[Sequence[cst.EmptyLine]], + OneOf[ + Union[ + Sequence[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + AtLeastN[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + AtMostN[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.EmptyLine]], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + AtLeastN[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + AtMostN[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.EmptyLine]], + ] + ], + ] = DoNotCare() + whitespace_after_except: Union[ + SimpleWhitespaceMatchType, + DoNotCareSentinel, + OneOf[SimpleWhitespaceMatchType], + AllOf[SimpleWhitespaceMatchType], + ] = DoNotCare() + whitespace_after_star: Union[ + SimpleWhitespaceMatchType, + DoNotCareSentinel, + OneOf[SimpleWhitespaceMatchType], + AllOf[SimpleWhitespaceMatchType], + ] = DoNotCare() + whitespace_before_colon: Union[ + SimpleWhitespaceMatchType, + DoNotCareSentinel, + OneOf[SimpleWhitespaceMatchType], + AllOf[SimpleWhitespaceMatchType], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class Expr(BaseSmallStatement, BaseMatcherNode): + value: Union[ + BaseExpressionMatchType, + DoNotCareSentinel, + OneOf[BaseExpressionMatchType], + AllOf[BaseExpressionMatchType], + ] = DoNotCare() + semicolon: Union[ + SemicolonMatchType, + DoNotCareSentinel, + OneOf[SemicolonMatchType], + AllOf[SemicolonMatchType], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class Finally(BaseMatcherNode): + body: Union[ + BaseSuiteMatchType, + DoNotCareSentinel, + OneOf[BaseSuiteMatchType], + AllOf[BaseSuiteMatchType], + ] = DoNotCare() + leading_lines: Union[ + Sequence[ + Union[ + EmptyLineMatchType, + DoNotCareSentinel, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + AtLeastN[ + Union[ + EmptyLineMatchType, + DoNotCareSentinel, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + AtMostN[ + Union[ + EmptyLineMatchType, + DoNotCareSentinel, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + ] + ], + DoNotCareSentinel, + MatchIfTrue[Sequence[cst.EmptyLine]], + OneOf[ + Union[ + Sequence[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + AtLeastN[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + AtMostN[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.EmptyLine]], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + AtLeastN[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + AtMostN[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.EmptyLine]], + ] + ], + ] = DoNotCare() + whitespace_before_colon: Union[ + SimpleWhitespaceMatchType, + DoNotCareSentinel, + OneOf[SimpleWhitespaceMatchType], + AllOf[SimpleWhitespaceMatchType], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class Float(BaseExpression, BaseNumber, BaseMatcherNode): + value: Union[ + strMatchType, DoNotCareSentinel, OneOf[strMatchType], AllOf[strMatchType] + ] = DoNotCare() + lpar: Union[ + Sequence[ + Union[ + LeftParenMatchType, + DoNotCareSentinel, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + AtLeastN[ + Union[ + LeftParenMatchType, + DoNotCareSentinel, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + AtMostN[ + Union[ + LeftParenMatchType, + DoNotCareSentinel, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + ] + ], + DoNotCareSentinel, + MatchIfTrue[Sequence[cst.LeftParen]], + OneOf[ + Union[ + Sequence[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + AtLeastN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + AtMostN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.LeftParen]], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + AtLeastN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + AtMostN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.LeftParen]], + ] + ], + ] = DoNotCare() + rpar: Union[ + Sequence[ + Union[ + RightParenMatchType, + DoNotCareSentinel, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + AtLeastN[ + Union[ + RightParenMatchType, + DoNotCareSentinel, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + AtMostN[ + Union[ + RightParenMatchType, + DoNotCareSentinel, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + ] + ], + DoNotCareSentinel, + MatchIfTrue[Sequence[cst.RightParen]], + OneOf[ + Union[ + Sequence[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + AtLeastN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + AtMostN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.RightParen]], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + AtLeastN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + AtMostN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.RightParen]], + ] + ], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class FloorDivide(BaseBinaryOp, BaseMatcherNode): + whitespace_before: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + whitespace_after: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class FloorDivideAssign(BaseAugOp, BaseMatcherNode): + whitespace_before: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + whitespace_after: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class For(BaseCompoundStatement, BaseStatement, BaseMatcherNode): + target: Union[ + BaseAssignTargetExpressionMatchType, + DoNotCareSentinel, + OneOf[BaseAssignTargetExpressionMatchType], + AllOf[BaseAssignTargetExpressionMatchType], + ] = DoNotCare() + iter: Union[ + BaseExpressionMatchType, + DoNotCareSentinel, + OneOf[BaseExpressionMatchType], + AllOf[BaseExpressionMatchType], + ] = DoNotCare() + body: Union[ + BaseSuiteMatchType, + DoNotCareSentinel, + OneOf[BaseSuiteMatchType], + AllOf[BaseSuiteMatchType], + ] = DoNotCare() + orelse: Union[ + Optional["Else"], + MetadataMatchType, + MatchIfTrue[Optional[cst.Else]], + DoNotCareSentinel, + OneOf[ + Union[Optional["Else"], MetadataMatchType, MatchIfTrue[Optional[cst.Else]]] + ], + AllOf[ + Union[Optional["Else"], MetadataMatchType, MatchIfTrue[Optional[cst.Else]]] + ], + ] = DoNotCare() + asynchronous: Union[ + Optional["Asynchronous"], + MetadataMatchType, + MatchIfTrue[Optional[cst.Asynchronous]], + DoNotCareSentinel, + OneOf[ + Union[ + Optional["Asynchronous"], + MetadataMatchType, + MatchIfTrue[Optional[cst.Asynchronous]], + ] + ], + AllOf[ + Union[ + Optional["Asynchronous"], + MetadataMatchType, + MatchIfTrue[Optional[cst.Asynchronous]], + ] + ], + ] = DoNotCare() + leading_lines: Union[ + Sequence[ + Union[ + EmptyLineMatchType, + DoNotCareSentinel, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + AtLeastN[ + Union[ + EmptyLineMatchType, + DoNotCareSentinel, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + AtMostN[ + Union[ + EmptyLineMatchType, + DoNotCareSentinel, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + ] + ], + DoNotCareSentinel, + MatchIfTrue[Sequence[cst.EmptyLine]], + OneOf[ + Union[ + Sequence[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + AtLeastN[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + AtMostN[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.EmptyLine]], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + AtLeastN[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + AtMostN[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.EmptyLine]], + ] + ], + ] = DoNotCare() + whitespace_after_for: Union[ + SimpleWhitespaceMatchType, + DoNotCareSentinel, + OneOf[SimpleWhitespaceMatchType], + AllOf[SimpleWhitespaceMatchType], + ] = DoNotCare() + whitespace_before_in: Union[ + SimpleWhitespaceMatchType, + DoNotCareSentinel, + OneOf[SimpleWhitespaceMatchType], + AllOf[SimpleWhitespaceMatchType], + ] = DoNotCare() + whitespace_after_in: Union[ + SimpleWhitespaceMatchType, + DoNotCareSentinel, + OneOf[SimpleWhitespaceMatchType], + AllOf[SimpleWhitespaceMatchType], + ] = DoNotCare() + whitespace_before_colon: Union[ + SimpleWhitespaceMatchType, + DoNotCareSentinel, + OneOf[SimpleWhitespaceMatchType], + AllOf[SimpleWhitespaceMatchType], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +BaseFormattedStringContentMatchType = Union[ + "BaseFormattedStringContent", + MetadataMatchType, + MatchIfTrue[cst.BaseFormattedStringContent], +] + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class FormattedString(BaseExpression, BaseString, BaseMatcherNode): + parts: Union[ + Sequence[ + Union[ + BaseFormattedStringContentMatchType, + DoNotCareSentinel, + OneOf[BaseFormattedStringContentMatchType], + AllOf[BaseFormattedStringContentMatchType], + AtLeastN[ + Union[ + BaseFormattedStringContentMatchType, + DoNotCareSentinel, + OneOf[BaseFormattedStringContentMatchType], + AllOf[BaseFormattedStringContentMatchType], + ] + ], + AtMostN[ + Union[ + BaseFormattedStringContentMatchType, + DoNotCareSentinel, + OneOf[BaseFormattedStringContentMatchType], + AllOf[BaseFormattedStringContentMatchType], + ] + ], + ] + ], + DoNotCareSentinel, + MatchIfTrue[Sequence[cst.BaseFormattedStringContent]], + OneOf[ + Union[ + Sequence[ + Union[ + BaseFormattedStringContentMatchType, + OneOf[BaseFormattedStringContentMatchType], + AllOf[BaseFormattedStringContentMatchType], + AtLeastN[ + Union[ + BaseFormattedStringContentMatchType, + OneOf[BaseFormattedStringContentMatchType], + AllOf[BaseFormattedStringContentMatchType], + ] + ], + AtMostN[ + Union[ + BaseFormattedStringContentMatchType, + OneOf[BaseFormattedStringContentMatchType], + AllOf[BaseFormattedStringContentMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.BaseFormattedStringContent]], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + BaseFormattedStringContentMatchType, + OneOf[BaseFormattedStringContentMatchType], + AllOf[BaseFormattedStringContentMatchType], + AtLeastN[ + Union[ + BaseFormattedStringContentMatchType, + OneOf[BaseFormattedStringContentMatchType], + AllOf[BaseFormattedStringContentMatchType], + ] + ], + AtMostN[ + Union[ + BaseFormattedStringContentMatchType, + OneOf[BaseFormattedStringContentMatchType], + AllOf[BaseFormattedStringContentMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.BaseFormattedStringContent]], + ] + ], + ] = DoNotCare() + start: Union[ + strMatchType, DoNotCareSentinel, OneOf[strMatchType], AllOf[strMatchType] + ] = DoNotCare() + end: Union[ + Literal['"', "'", '"""', "'''"], + MetadataMatchType, + MatchIfTrue[Literal['"', "'", '"""', "'''"]], + DoNotCareSentinel, + OneOf[ + Union[ + Literal['"', "'", '"""', "'''"], + MetadataMatchType, + MatchIfTrue[Literal['"', "'", '"""', "'''"]], + ] + ], + AllOf[ + Union[ + Literal['"', "'", '"""', "'''"], + MetadataMatchType, + MatchIfTrue[Literal['"', "'", '"""', "'''"]], + ] + ], + ] = DoNotCare() + lpar: Union[ + Sequence[ + Union[ + LeftParenMatchType, + DoNotCareSentinel, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + AtLeastN[ + Union[ + LeftParenMatchType, + DoNotCareSentinel, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + AtMostN[ + Union[ + LeftParenMatchType, + DoNotCareSentinel, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + ] + ], + DoNotCareSentinel, + MatchIfTrue[Sequence[cst.LeftParen]], + OneOf[ + Union[ + Sequence[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + AtLeastN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + AtMostN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.LeftParen]], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + AtLeastN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + AtMostN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.LeftParen]], + ] + ], + ] = DoNotCare() + rpar: Union[ + Sequence[ + Union[ + RightParenMatchType, + DoNotCareSentinel, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + AtLeastN[ + Union[ + RightParenMatchType, + DoNotCareSentinel, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + AtMostN[ + Union[ + RightParenMatchType, + DoNotCareSentinel, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + ] + ], + DoNotCareSentinel, + MatchIfTrue[Sequence[cst.RightParen]], + OneOf[ + Union[ + Sequence[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + AtLeastN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + AtMostN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.RightParen]], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + AtLeastN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + AtMostN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.RightParen]], + ] + ], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class FormattedStringExpression(BaseFormattedStringContent, BaseMatcherNode): + expression: Union[ + BaseExpressionMatchType, + DoNotCareSentinel, + OneOf[BaseExpressionMatchType], + AllOf[BaseExpressionMatchType], + ] = DoNotCare() + conversion: Union[ + Optional[str], + MetadataMatchType, + MatchIfTrue[Optional[str]], + DoNotCareSentinel, + OneOf[Union[Optional[str], MetadataMatchType, MatchIfTrue[Optional[str]]]], + AllOf[Union[Optional[str], MetadataMatchType, MatchIfTrue[Optional[str]]]], + ] = DoNotCare() + format_spec: Union[ + Optional[Sequence["BaseFormattedStringContent"]], + MetadataMatchType, + MatchIfTrue[Optional[Sequence[cst.BaseFormattedStringContent]]], + DoNotCareSentinel, + OneOf[ + Union[ + Optional[Sequence["BaseFormattedStringContent"]], + MetadataMatchType, + MatchIfTrue[Optional[Sequence[cst.BaseFormattedStringContent]]], + ] + ], + AllOf[ + Union[ + Optional[Sequence["BaseFormattedStringContent"]], + MetadataMatchType, + MatchIfTrue[Optional[Sequence[cst.BaseFormattedStringContent]]], + ] + ], + ] = DoNotCare() + whitespace_before_expression: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + whitespace_after_expression: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + equal: Union[ + Optional["AssignEqual"], + MetadataMatchType, + MatchIfTrue[Optional[cst.AssignEqual]], + DoNotCareSentinel, + OneOf[ + Union[ + Optional["AssignEqual"], + MetadataMatchType, + MatchIfTrue[Optional[cst.AssignEqual]], + ] + ], + AllOf[ + Union[ + Optional["AssignEqual"], + MetadataMatchType, + MatchIfTrue[Optional[cst.AssignEqual]], + ] + ], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class FormattedStringText(BaseFormattedStringContent, BaseMatcherNode): + value: Union[ + strMatchType, DoNotCareSentinel, OneOf[strMatchType], AllOf[strMatchType] + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class From(BaseMatcherNode): + item: Union[ + BaseExpressionMatchType, + DoNotCareSentinel, + OneOf[BaseExpressionMatchType], + AllOf[BaseExpressionMatchType], + ] = DoNotCare() + whitespace_before_from: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + whitespace_after_from: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +ParametersMatchType = Union[ + "Parameters", MetadataMatchType, MatchIfTrue[cst.Parameters] +] + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class FunctionDef(BaseCompoundStatement, BaseStatement, BaseMatcherNode): + name: Union[ + NameMatchType, DoNotCareSentinel, OneOf[NameMatchType], AllOf[NameMatchType] + ] = DoNotCare() + params: Union[ + ParametersMatchType, + DoNotCareSentinel, + OneOf[ParametersMatchType], + AllOf[ParametersMatchType], + ] = DoNotCare() + body: Union[ + BaseSuiteMatchType, + DoNotCareSentinel, + OneOf[BaseSuiteMatchType], + AllOf[BaseSuiteMatchType], + ] = DoNotCare() + decorators: Union[ + Sequence[ + Union[ + DecoratorMatchType, + DoNotCareSentinel, + OneOf[DecoratorMatchType], + AllOf[DecoratorMatchType], + AtLeastN[ + Union[ + DecoratorMatchType, + DoNotCareSentinel, + OneOf[DecoratorMatchType], + AllOf[DecoratorMatchType], + ] + ], + AtMostN[ + Union[ + DecoratorMatchType, + DoNotCareSentinel, + OneOf[DecoratorMatchType], + AllOf[DecoratorMatchType], + ] + ], + ] + ], + DoNotCareSentinel, + MatchIfTrue[Sequence[cst.Decorator]], + OneOf[ + Union[ + Sequence[ + Union[ + DecoratorMatchType, + OneOf[DecoratorMatchType], + AllOf[DecoratorMatchType], + AtLeastN[ + Union[ + DecoratorMatchType, + OneOf[DecoratorMatchType], + AllOf[DecoratorMatchType], + ] + ], + AtMostN[ + Union[ + DecoratorMatchType, + OneOf[DecoratorMatchType], + AllOf[DecoratorMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.Decorator]], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + DecoratorMatchType, + OneOf[DecoratorMatchType], + AllOf[DecoratorMatchType], + AtLeastN[ + Union[ + DecoratorMatchType, + OneOf[DecoratorMatchType], + AllOf[DecoratorMatchType], + ] + ], + AtMostN[ + Union[ + DecoratorMatchType, + OneOf[DecoratorMatchType], + AllOf[DecoratorMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.Decorator]], + ] + ], + ] = DoNotCare() + returns: Union[ + Optional["Annotation"], + MetadataMatchType, + MatchIfTrue[Optional[cst.Annotation]], + DoNotCareSentinel, + OneOf[ + Union[ + Optional["Annotation"], + MetadataMatchType, + MatchIfTrue[Optional[cst.Annotation]], + ] + ], + AllOf[ + Union[ + Optional["Annotation"], + MetadataMatchType, + MatchIfTrue[Optional[cst.Annotation]], + ] + ], + ] = DoNotCare() + asynchronous: Union[ + Optional["Asynchronous"], + MetadataMatchType, + MatchIfTrue[Optional[cst.Asynchronous]], + DoNotCareSentinel, + OneOf[ + Union[ + Optional["Asynchronous"], + MetadataMatchType, + MatchIfTrue[Optional[cst.Asynchronous]], + ] + ], + AllOf[ + Union[ + Optional["Asynchronous"], + MetadataMatchType, + MatchIfTrue[Optional[cst.Asynchronous]], + ] + ], + ] = DoNotCare() + leading_lines: Union[ + Sequence[ + Union[ + EmptyLineMatchType, + DoNotCareSentinel, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + AtLeastN[ + Union[ + EmptyLineMatchType, + DoNotCareSentinel, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + AtMostN[ + Union[ + EmptyLineMatchType, + DoNotCareSentinel, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + ] + ], + DoNotCareSentinel, + MatchIfTrue[Sequence[cst.EmptyLine]], + OneOf[ + Union[ + Sequence[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + AtLeastN[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + AtMostN[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.EmptyLine]], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + AtLeastN[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + AtMostN[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.EmptyLine]], + ] + ], + ] = DoNotCare() + lines_after_decorators: Union[ + Sequence[ + Union[ + EmptyLineMatchType, + DoNotCareSentinel, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + AtLeastN[ + Union[ + EmptyLineMatchType, + DoNotCareSentinel, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + AtMostN[ + Union[ + EmptyLineMatchType, + DoNotCareSentinel, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + ] + ], + DoNotCareSentinel, + MatchIfTrue[Sequence[cst.EmptyLine]], + OneOf[ + Union[ + Sequence[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + AtLeastN[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + AtMostN[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.EmptyLine]], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + AtLeastN[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + AtMostN[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.EmptyLine]], + ] + ], + ] = DoNotCare() + whitespace_after_def: Union[ + SimpleWhitespaceMatchType, + DoNotCareSentinel, + OneOf[SimpleWhitespaceMatchType], + AllOf[SimpleWhitespaceMatchType], + ] = DoNotCare() + whitespace_after_name: Union[ + SimpleWhitespaceMatchType, + DoNotCareSentinel, + OneOf[SimpleWhitespaceMatchType], + AllOf[SimpleWhitespaceMatchType], + ] = DoNotCare() + whitespace_before_params: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + whitespace_before_colon: Union[ + SimpleWhitespaceMatchType, + DoNotCareSentinel, + OneOf[SimpleWhitespaceMatchType], + AllOf[SimpleWhitespaceMatchType], + ] = DoNotCare() + type_parameters: Union[ + Optional["TypeParameters"], + MetadataMatchType, + MatchIfTrue[Optional[cst.TypeParameters]], + DoNotCareSentinel, + OneOf[ + Union[ + Optional["TypeParameters"], + MetadataMatchType, + MatchIfTrue[Optional[cst.TypeParameters]], + ] + ], + AllOf[ + Union[ + Optional["TypeParameters"], + MetadataMatchType, + MatchIfTrue[Optional[cst.TypeParameters]], + ] + ], + ] = DoNotCare() + whitespace_after_type_parameters: Union[ + SimpleWhitespaceMatchType, + DoNotCareSentinel, + OneOf[SimpleWhitespaceMatchType], + AllOf[SimpleWhitespaceMatchType], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class GeneratorExp(BaseComp, BaseExpression, BaseSimpleComp, BaseMatcherNode): + elt: Union[ + BaseExpressionMatchType, + DoNotCareSentinel, + OneOf[BaseExpressionMatchType], + AllOf[BaseExpressionMatchType], + ] = DoNotCare() + for_in: Union[ + CompForMatchType, + DoNotCareSentinel, + OneOf[CompForMatchType], + AllOf[CompForMatchType], + ] = DoNotCare() + lpar: Union[ + Sequence[ + Union[ + LeftParenMatchType, + DoNotCareSentinel, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + AtLeastN[ + Union[ + LeftParenMatchType, + DoNotCareSentinel, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + AtMostN[ + Union[ + LeftParenMatchType, + DoNotCareSentinel, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + ] + ], + DoNotCareSentinel, + MatchIfTrue[Sequence[cst.LeftParen]], + OneOf[ + Union[ + Sequence[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + AtLeastN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + AtMostN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.LeftParen]], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + AtLeastN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + AtMostN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.LeftParen]], + ] + ], + ] = DoNotCare() + rpar: Union[ + Sequence[ + Union[ + RightParenMatchType, + DoNotCareSentinel, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + AtLeastN[ + Union[ + RightParenMatchType, + DoNotCareSentinel, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + AtMostN[ + Union[ + RightParenMatchType, + DoNotCareSentinel, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + ] + ], + DoNotCareSentinel, + MatchIfTrue[Sequence[cst.RightParen]], + OneOf[ + Union[ + Sequence[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + AtLeastN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + AtMostN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.RightParen]], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + AtLeastN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + AtMostN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.RightParen]], + ] + ], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +NameItemMatchType = Union["NameItem", MetadataMatchType, MatchIfTrue[cst.NameItem]] + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class Global(BaseSmallStatement, BaseMatcherNode): + names: Union[ + Sequence[ + Union[ + NameItemMatchType, + DoNotCareSentinel, + OneOf[NameItemMatchType], + AllOf[NameItemMatchType], + AtLeastN[ + Union[ + NameItemMatchType, + DoNotCareSentinel, + OneOf[NameItemMatchType], + AllOf[NameItemMatchType], + ] + ], + AtMostN[ + Union[ + NameItemMatchType, + DoNotCareSentinel, + OneOf[NameItemMatchType], + AllOf[NameItemMatchType], + ] + ], + ] + ], + DoNotCareSentinel, + MatchIfTrue[Sequence[cst.NameItem]], + OneOf[ + Union[ + Sequence[ + Union[ + NameItemMatchType, + OneOf[NameItemMatchType], + AllOf[NameItemMatchType], + AtLeastN[ + Union[ + NameItemMatchType, + OneOf[NameItemMatchType], + AllOf[NameItemMatchType], + ] + ], + AtMostN[ + Union[ + NameItemMatchType, + OneOf[NameItemMatchType], + AllOf[NameItemMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.NameItem]], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + NameItemMatchType, + OneOf[NameItemMatchType], + AllOf[NameItemMatchType], + AtLeastN[ + Union[ + NameItemMatchType, + OneOf[NameItemMatchType], + AllOf[NameItemMatchType], + ] + ], + AtMostN[ + Union[ + NameItemMatchType, + OneOf[NameItemMatchType], + AllOf[NameItemMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.NameItem]], + ] + ], + ] = DoNotCare() + whitespace_after_global: Union[ + SimpleWhitespaceMatchType, + DoNotCareSentinel, + OneOf[SimpleWhitespaceMatchType], + AllOf[SimpleWhitespaceMatchType], + ] = DoNotCare() + semicolon: Union[ + SemicolonMatchType, + DoNotCareSentinel, + OneOf[SemicolonMatchType], + AllOf[SemicolonMatchType], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class GreaterThan(BaseCompOp, BaseMatcherNode): + whitespace_before: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + whitespace_after: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class GreaterThanEqual(BaseCompOp, BaseMatcherNode): + whitespace_before: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + whitespace_after: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +IfOrElseOrNoneMatchType = Union[ + "If", "Else", None, MetadataMatchType, MatchIfTrue[Union[cst.If, cst.Else, None]] +] + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class If(BaseCompoundStatement, BaseStatement, BaseMatcherNode): + test: Union[ + BaseExpressionMatchType, + DoNotCareSentinel, + OneOf[BaseExpressionMatchType], + AllOf[BaseExpressionMatchType], + ] = DoNotCare() + body: Union[ + BaseSuiteMatchType, + DoNotCareSentinel, + OneOf[BaseSuiteMatchType], + AllOf[BaseSuiteMatchType], + ] = DoNotCare() + orelse: Union[ + IfOrElseOrNoneMatchType, + DoNotCareSentinel, + OneOf[IfOrElseOrNoneMatchType], + AllOf[IfOrElseOrNoneMatchType], + ] = DoNotCare() + leading_lines: Union[ + Sequence[ + Union[ + EmptyLineMatchType, + DoNotCareSentinel, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + AtLeastN[ + Union[ + EmptyLineMatchType, + DoNotCareSentinel, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + AtMostN[ + Union[ + EmptyLineMatchType, + DoNotCareSentinel, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + ] + ], + DoNotCareSentinel, + MatchIfTrue[Sequence[cst.EmptyLine]], + OneOf[ + Union[ + Sequence[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + AtLeastN[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + AtMostN[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.EmptyLine]], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + AtLeastN[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + AtMostN[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.EmptyLine]], + ] + ], + ] = DoNotCare() + whitespace_before_test: Union[ + SimpleWhitespaceMatchType, + DoNotCareSentinel, + OneOf[SimpleWhitespaceMatchType], + AllOf[SimpleWhitespaceMatchType], + ] = DoNotCare() + whitespace_after_test: Union[ + SimpleWhitespaceMatchType, + DoNotCareSentinel, + OneOf[SimpleWhitespaceMatchType], + AllOf[SimpleWhitespaceMatchType], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class IfExp(BaseExpression, BaseMatcherNode): + test: Union[ + BaseExpressionMatchType, + DoNotCareSentinel, + OneOf[BaseExpressionMatchType], + AllOf[BaseExpressionMatchType], + ] = DoNotCare() + body: Union[ + BaseExpressionMatchType, + DoNotCareSentinel, + OneOf[BaseExpressionMatchType], + AllOf[BaseExpressionMatchType], + ] = DoNotCare() + orelse: Union[ + BaseExpressionMatchType, + DoNotCareSentinel, + OneOf[BaseExpressionMatchType], + AllOf[BaseExpressionMatchType], + ] = DoNotCare() + lpar: Union[ + Sequence[ + Union[ + LeftParenMatchType, + DoNotCareSentinel, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + AtLeastN[ + Union[ + LeftParenMatchType, + DoNotCareSentinel, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + AtMostN[ + Union[ + LeftParenMatchType, + DoNotCareSentinel, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + ] + ], + DoNotCareSentinel, + MatchIfTrue[Sequence[cst.LeftParen]], + OneOf[ + Union[ + Sequence[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + AtLeastN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + AtMostN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.LeftParen]], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + AtLeastN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + AtMostN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.LeftParen]], + ] + ], + ] = DoNotCare() + rpar: Union[ + Sequence[ + Union[ + RightParenMatchType, + DoNotCareSentinel, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + AtLeastN[ + Union[ + RightParenMatchType, + DoNotCareSentinel, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + AtMostN[ + Union[ + RightParenMatchType, + DoNotCareSentinel, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + ] + ], + DoNotCareSentinel, + MatchIfTrue[Sequence[cst.RightParen]], + OneOf[ + Union[ + Sequence[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + AtLeastN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + AtMostN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.RightParen]], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + AtLeastN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + AtMostN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.RightParen]], + ] + ], + ] = DoNotCare() + whitespace_before_if: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + whitespace_after_if: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + whitespace_before_else: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + whitespace_after_else: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class Imaginary(BaseExpression, BaseNumber, BaseMatcherNode): + value: Union[ + strMatchType, DoNotCareSentinel, OneOf[strMatchType], AllOf[strMatchType] + ] = DoNotCare() + lpar: Union[ + Sequence[ + Union[ + LeftParenMatchType, + DoNotCareSentinel, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + AtLeastN[ + Union[ + LeftParenMatchType, + DoNotCareSentinel, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + AtMostN[ + Union[ + LeftParenMatchType, + DoNotCareSentinel, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + ] + ], + DoNotCareSentinel, + MatchIfTrue[Sequence[cst.LeftParen]], + OneOf[ + Union[ + Sequence[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + AtLeastN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + AtMostN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.LeftParen]], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + AtLeastN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + AtMostN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.LeftParen]], + ] + ], + ] = DoNotCare() + rpar: Union[ + Sequence[ + Union[ + RightParenMatchType, + DoNotCareSentinel, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + AtLeastN[ + Union[ + RightParenMatchType, + DoNotCareSentinel, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + AtMostN[ + Union[ + RightParenMatchType, + DoNotCareSentinel, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + ] + ], + DoNotCareSentinel, + MatchIfTrue[Sequence[cst.RightParen]], + OneOf[ + Union[ + Sequence[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + AtLeastN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + AtMostN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.RightParen]], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + AtLeastN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + AtMostN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.RightParen]], + ] + ], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +ImportAliasMatchType = Union[ + "ImportAlias", MetadataMatchType, MatchIfTrue[cst.ImportAlias] +] + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class Import(BaseSmallStatement, BaseMatcherNode): + names: Union[ + Sequence[ + Union[ + ImportAliasMatchType, + DoNotCareSentinel, + OneOf[ImportAliasMatchType], + AllOf[ImportAliasMatchType], + AtLeastN[ + Union[ + ImportAliasMatchType, + DoNotCareSentinel, + OneOf[ImportAliasMatchType], + AllOf[ImportAliasMatchType], + ] + ], + AtMostN[ + Union[ + ImportAliasMatchType, + DoNotCareSentinel, + OneOf[ImportAliasMatchType], + AllOf[ImportAliasMatchType], + ] + ], + ] + ], + DoNotCareSentinel, + MatchIfTrue[Sequence[cst.ImportAlias]], + OneOf[ + Union[ + Sequence[ + Union[ + ImportAliasMatchType, + OneOf[ImportAliasMatchType], + AllOf[ImportAliasMatchType], + AtLeastN[ + Union[ + ImportAliasMatchType, + OneOf[ImportAliasMatchType], + AllOf[ImportAliasMatchType], + ] + ], + AtMostN[ + Union[ + ImportAliasMatchType, + OneOf[ImportAliasMatchType], + AllOf[ImportAliasMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.ImportAlias]], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + ImportAliasMatchType, + OneOf[ImportAliasMatchType], + AllOf[ImportAliasMatchType], + AtLeastN[ + Union[ + ImportAliasMatchType, + OneOf[ImportAliasMatchType], + AllOf[ImportAliasMatchType], + ] + ], + AtMostN[ + Union[ + ImportAliasMatchType, + OneOf[ImportAliasMatchType], + AllOf[ImportAliasMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.ImportAlias]], + ] + ], + ] = DoNotCare() + semicolon: Union[ + SemicolonMatchType, + DoNotCareSentinel, + OneOf[SemicolonMatchType], + AllOf[SemicolonMatchType], + ] = DoNotCare() + whitespace_after_import: Union[ + SimpleWhitespaceMatchType, + DoNotCareSentinel, + OneOf[SimpleWhitespaceMatchType], + AllOf[SimpleWhitespaceMatchType], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +AttributeOrNameMatchType = Union[ + "Attribute", "Name", MetadataMatchType, MatchIfTrue[Union[cst.Attribute, cst.Name]] +] + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class ImportAlias(BaseMatcherNode): + name: Union[ + AttributeOrNameMatchType, + DoNotCareSentinel, + OneOf[AttributeOrNameMatchType], + AllOf[AttributeOrNameMatchType], + ] = DoNotCare() + asname: Union[ + Optional["AsName"], + MetadataMatchType, + MatchIfTrue[Optional[cst.AsName]], + DoNotCareSentinel, + OneOf[ + Union[ + Optional["AsName"], MetadataMatchType, MatchIfTrue[Optional[cst.AsName]] + ] + ], + AllOf[ + Union[ + Optional["AsName"], MetadataMatchType, MatchIfTrue[Optional[cst.AsName]] + ] + ], + ] = DoNotCare() + comma: Union[ + CommaMatchType, DoNotCareSentinel, OneOf[CommaMatchType], AllOf[CommaMatchType] + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +AttributeOrNameOrNoneMatchType = Union[ + "Attribute", + "Name", + None, + MetadataMatchType, + MatchIfTrue[Union[cst.Attribute, cst.Name, None]], +] + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class ImportFrom(BaseSmallStatement, BaseMatcherNode): + module: Union[ + AttributeOrNameOrNoneMatchType, + DoNotCareSentinel, + OneOf[AttributeOrNameOrNoneMatchType], + AllOf[AttributeOrNameOrNoneMatchType], + ] = DoNotCare() + names: Union[ + Union[ + Sequence[ + Union[ + ImportAliasMatchType, + DoNotCareSentinel, + OneOf[ImportAliasMatchType], + AllOf[ImportAliasMatchType], + AtLeastN[ + Union[ + ImportAliasMatchType, + DoNotCareSentinel, + OneOf[ImportAliasMatchType], + AllOf[ImportAliasMatchType], + ] + ], + AtMostN[ + Union[ + ImportAliasMatchType, + DoNotCareSentinel, + OneOf[ImportAliasMatchType], + AllOf[ImportAliasMatchType], + ] + ], + ] + ], + DoNotCareSentinel, + MatchIfTrue[Sequence[cst.ImportAlias]], + OneOf[ + Union[ + Sequence[ + Union[ + ImportAliasMatchType, + OneOf[ImportAliasMatchType], + AllOf[ImportAliasMatchType], + AtLeastN[ + Union[ + ImportAliasMatchType, + OneOf[ImportAliasMatchType], + AllOf[ImportAliasMatchType], + ] + ], + AtMostN[ + Union[ + ImportAliasMatchType, + OneOf[ImportAliasMatchType], + AllOf[ImportAliasMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.ImportAlias]], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + ImportAliasMatchType, + OneOf[ImportAliasMatchType], + AllOf[ImportAliasMatchType], + AtLeastN[ + Union[ + ImportAliasMatchType, + OneOf[ImportAliasMatchType], + AllOf[ImportAliasMatchType], + ] + ], + AtMostN[ + Union[ + ImportAliasMatchType, + OneOf[ImportAliasMatchType], + AllOf[ImportAliasMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.ImportAlias]], + ] + ], + ], + "ImportStar", + MetadataMatchType, + MatchIfTrue[ + Union[ + Sequence[cst.ImportAlias], + cst.ImportStar, + OneOf[Union[Sequence[cst.ImportAlias], cst.ImportStar]], + AllOf[Union[Sequence[cst.ImportAlias], cst.ImportStar]], + ] + ], + DoNotCareSentinel, + OneOf[ + Union[ + Union[ + Sequence[ + Union[ + ImportAliasMatchType, + OneOf[ImportAliasMatchType], + AllOf[ImportAliasMatchType], + AtLeastN[ + Union[ + ImportAliasMatchType, + OneOf[ImportAliasMatchType], + AllOf[ImportAliasMatchType], + ] + ], + AtMostN[ + Union[ + ImportAliasMatchType, + OneOf[ImportAliasMatchType], + AllOf[ImportAliasMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.ImportAlias]], + OneOf[ + Union[ + Sequence[ + Union[ + ImportAliasMatchType, + OneOf[ImportAliasMatchType], + AllOf[ImportAliasMatchType], + AtLeastN[ + Union[ + ImportAliasMatchType, + OneOf[ImportAliasMatchType], + AllOf[ImportAliasMatchType], + ] + ], + AtMostN[ + Union[ + ImportAliasMatchType, + OneOf[ImportAliasMatchType], + AllOf[ImportAliasMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.ImportAlias]], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + ImportAliasMatchType, + OneOf[ImportAliasMatchType], + AllOf[ImportAliasMatchType], + AtLeastN[ + Union[ + ImportAliasMatchType, + OneOf[ImportAliasMatchType], + AllOf[ImportAliasMatchType], + ] + ], + AtMostN[ + Union[ + ImportAliasMatchType, + OneOf[ImportAliasMatchType], + AllOf[ImportAliasMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.ImportAlias]], + ] + ], + ], + "ImportStar", + MetadataMatchType, + MatchIfTrue[ + Union[ + Sequence[cst.ImportAlias], + cst.ImportStar, + OneOf[Union[Sequence[cst.ImportAlias], cst.ImportStar]], + AllOf[Union[Sequence[cst.ImportAlias], cst.ImportStar]], + ] + ], + ] + ], + AllOf[ + Union[ + Union[ + Sequence[ + Union[ + ImportAliasMatchType, + OneOf[ImportAliasMatchType], + AllOf[ImportAliasMatchType], + AtLeastN[ + Union[ + ImportAliasMatchType, + OneOf[ImportAliasMatchType], + AllOf[ImportAliasMatchType], + ] + ], + AtMostN[ + Union[ + ImportAliasMatchType, + OneOf[ImportAliasMatchType], + AllOf[ImportAliasMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.ImportAlias]], + OneOf[ + Union[ + Sequence[ + Union[ + ImportAliasMatchType, + OneOf[ImportAliasMatchType], + AllOf[ImportAliasMatchType], + AtLeastN[ + Union[ + ImportAliasMatchType, + OneOf[ImportAliasMatchType], + AllOf[ImportAliasMatchType], + ] + ], + AtMostN[ + Union[ + ImportAliasMatchType, + OneOf[ImportAliasMatchType], + AllOf[ImportAliasMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.ImportAlias]], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + ImportAliasMatchType, + OneOf[ImportAliasMatchType], + AllOf[ImportAliasMatchType], + AtLeastN[ + Union[ + ImportAliasMatchType, + OneOf[ImportAliasMatchType], + AllOf[ImportAliasMatchType], + ] + ], + AtMostN[ + Union[ + ImportAliasMatchType, + OneOf[ImportAliasMatchType], + AllOf[ImportAliasMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.ImportAlias]], + ] + ], + ], + "ImportStar", + MetadataMatchType, + MatchIfTrue[ + Union[ + Sequence[cst.ImportAlias], + cst.ImportStar, + OneOf[Union[Sequence[cst.ImportAlias], cst.ImportStar]], + AllOf[Union[Sequence[cst.ImportAlias], cst.ImportStar]], + ] + ], + ] + ], + ] = DoNotCare() + relative: Union[ + Sequence[ + Union[ + DotMatchType, + DoNotCareSentinel, + OneOf[DotMatchType], + AllOf[DotMatchType], + AtLeastN[ + Union[ + DotMatchType, + DoNotCareSentinel, + OneOf[DotMatchType], + AllOf[DotMatchType], + ] + ], + AtMostN[ + Union[ + DotMatchType, + DoNotCareSentinel, + OneOf[DotMatchType], + AllOf[DotMatchType], + ] + ], + ] + ], + DoNotCareSentinel, + MatchIfTrue[Sequence[cst.Dot]], + OneOf[ + Union[ + Sequence[ + Union[ + DotMatchType, + OneOf[DotMatchType], + AllOf[DotMatchType], + AtLeastN[ + Union[ + DotMatchType, OneOf[DotMatchType], AllOf[DotMatchType] + ] + ], + AtMostN[ + Union[ + DotMatchType, OneOf[DotMatchType], AllOf[DotMatchType] + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.Dot]], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + DotMatchType, + OneOf[DotMatchType], + AllOf[DotMatchType], + AtLeastN[ + Union[ + DotMatchType, OneOf[DotMatchType], AllOf[DotMatchType] + ] + ], + AtMostN[ + Union[ + DotMatchType, OneOf[DotMatchType], AllOf[DotMatchType] + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.Dot]], + ] + ], + ] = DoNotCare() + lpar: Union[ + Optional["LeftParen"], + MetadataMatchType, + MatchIfTrue[Optional[cst.LeftParen]], + DoNotCareSentinel, + OneOf[ + Union[ + Optional["LeftParen"], + MetadataMatchType, + MatchIfTrue[Optional[cst.LeftParen]], + ] + ], + AllOf[ + Union[ + Optional["LeftParen"], + MetadataMatchType, + MatchIfTrue[Optional[cst.LeftParen]], + ] + ], + ] = DoNotCare() + rpar: Union[ + Optional["RightParen"], + MetadataMatchType, + MatchIfTrue[Optional[cst.RightParen]], + DoNotCareSentinel, + OneOf[ + Union[ + Optional["RightParen"], + MetadataMatchType, + MatchIfTrue[Optional[cst.RightParen]], + ] + ], + AllOf[ + Union[ + Optional["RightParen"], + MetadataMatchType, + MatchIfTrue[Optional[cst.RightParen]], + ] + ], + ] = DoNotCare() + semicolon: Union[ + SemicolonMatchType, + DoNotCareSentinel, + OneOf[SemicolonMatchType], + AllOf[SemicolonMatchType], + ] = DoNotCare() + whitespace_after_from: Union[ + SimpleWhitespaceMatchType, + DoNotCareSentinel, + OneOf[SimpleWhitespaceMatchType], + AllOf[SimpleWhitespaceMatchType], + ] = DoNotCare() + whitespace_before_import: Union[ + SimpleWhitespaceMatchType, + DoNotCareSentinel, + OneOf[SimpleWhitespaceMatchType], + AllOf[SimpleWhitespaceMatchType], + ] = DoNotCare() + whitespace_after_import: Union[ + SimpleWhitespaceMatchType, + DoNotCareSentinel, + OneOf[SimpleWhitespaceMatchType], + AllOf[SimpleWhitespaceMatchType], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class ImportStar(BaseMatcherNode): + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class In(BaseCompOp, BaseMatcherNode): + whitespace_before: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + whitespace_after: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +BaseStatementMatchType = Union[ + "BaseStatement", MetadataMatchType, MatchIfTrue[cst.BaseStatement] +] + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class IndentedBlock(BaseSuite, BaseMatcherNode): + body: Union[ + Sequence[ + Union[ + BaseStatementMatchType, + DoNotCareSentinel, + OneOf[BaseStatementMatchType], + AllOf[BaseStatementMatchType], + AtLeastN[ + Union[ + BaseStatementMatchType, + DoNotCareSentinel, + OneOf[BaseStatementMatchType], + AllOf[BaseStatementMatchType], + ] + ], + AtMostN[ + Union[ + BaseStatementMatchType, + DoNotCareSentinel, + OneOf[BaseStatementMatchType], + AllOf[BaseStatementMatchType], + ] + ], + ] + ], + DoNotCareSentinel, + MatchIfTrue[Sequence[cst.BaseStatement]], + OneOf[ + Union[ + Sequence[ + Union[ + BaseStatementMatchType, + OneOf[BaseStatementMatchType], + AllOf[BaseStatementMatchType], + AtLeastN[ + Union[ + BaseStatementMatchType, + OneOf[BaseStatementMatchType], + AllOf[BaseStatementMatchType], + ] + ], + AtMostN[ + Union[ + BaseStatementMatchType, + OneOf[BaseStatementMatchType], + AllOf[BaseStatementMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.BaseStatement]], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + BaseStatementMatchType, + OneOf[BaseStatementMatchType], + AllOf[BaseStatementMatchType], + AtLeastN[ + Union[ + BaseStatementMatchType, + OneOf[BaseStatementMatchType], + AllOf[BaseStatementMatchType], + ] + ], + AtMostN[ + Union[ + BaseStatementMatchType, + OneOf[BaseStatementMatchType], + AllOf[BaseStatementMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.BaseStatement]], + ] + ], + ] = DoNotCare() + header: Union[ + TrailingWhitespaceMatchType, + DoNotCareSentinel, + OneOf[TrailingWhitespaceMatchType], + AllOf[TrailingWhitespaceMatchType], + ] = DoNotCare() + indent: Union[ + Optional[str], + MetadataMatchType, + MatchIfTrue[Optional[str]], + DoNotCareSentinel, + OneOf[Union[Optional[str], MetadataMatchType, MatchIfTrue[Optional[str]]]], + AllOf[Union[Optional[str], MetadataMatchType, MatchIfTrue[Optional[str]]]], + ] = DoNotCare() + footer: Union[ + Sequence[ + Union[ + EmptyLineMatchType, + DoNotCareSentinel, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + AtLeastN[ + Union[ + EmptyLineMatchType, + DoNotCareSentinel, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + AtMostN[ + Union[ + EmptyLineMatchType, + DoNotCareSentinel, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + ] + ], + DoNotCareSentinel, + MatchIfTrue[Sequence[cst.EmptyLine]], + OneOf[ + Union[ + Sequence[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + AtLeastN[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + AtMostN[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.EmptyLine]], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + AtLeastN[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + AtMostN[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.EmptyLine]], + ] + ], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class Index(BaseSlice, BaseMatcherNode): + value: Union[ + BaseExpressionMatchType, + DoNotCareSentinel, + OneOf[BaseExpressionMatchType], + AllOf[BaseExpressionMatchType], + ] = DoNotCare() + star: Union[ + Optional[Literal["*"]], + MetadataMatchType, + MatchIfTrue[Optional[Literal["*"]]], + DoNotCareSentinel, + OneOf[ + Union[ + Optional[Literal["*"]], + MetadataMatchType, + MatchIfTrue[Optional[Literal["*"]]], + ] + ], + AllOf[ + Union[ + Optional[Literal["*"]], + MetadataMatchType, + MatchIfTrue[Optional[Literal["*"]]], + ] + ], + ] = DoNotCare() + whitespace_after_star: Union[ + Optional["BaseParenthesizableWhitespace"], + MetadataMatchType, + MatchIfTrue[Optional[cst.BaseParenthesizableWhitespace]], + DoNotCareSentinel, + OneOf[ + Union[ + Optional["BaseParenthesizableWhitespace"], + MetadataMatchType, + MatchIfTrue[Optional[cst.BaseParenthesizableWhitespace]], + ] + ], + AllOf[ + Union[ + Optional["BaseParenthesizableWhitespace"], + MetadataMatchType, + MatchIfTrue[Optional[cst.BaseParenthesizableWhitespace]], + ] + ], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class Integer(BaseExpression, BaseNumber, BaseMatcherNode): + value: Union[ + strMatchType, DoNotCareSentinel, OneOf[strMatchType], AllOf[strMatchType] + ] = DoNotCare() + lpar: Union[ + Sequence[ + Union[ + LeftParenMatchType, + DoNotCareSentinel, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + AtLeastN[ + Union[ + LeftParenMatchType, + DoNotCareSentinel, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + AtMostN[ + Union[ + LeftParenMatchType, + DoNotCareSentinel, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + ] + ], + DoNotCareSentinel, + MatchIfTrue[Sequence[cst.LeftParen]], + OneOf[ + Union[ + Sequence[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + AtLeastN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + AtMostN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.LeftParen]], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + AtLeastN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + AtMostN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.LeftParen]], + ] + ], + ] = DoNotCare() + rpar: Union[ + Sequence[ + Union[ + RightParenMatchType, + DoNotCareSentinel, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + AtLeastN[ + Union[ + RightParenMatchType, + DoNotCareSentinel, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + AtMostN[ + Union[ + RightParenMatchType, + DoNotCareSentinel, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + ] + ], + DoNotCareSentinel, + MatchIfTrue[Sequence[cst.RightParen]], + OneOf[ + Union[ + Sequence[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + AtLeastN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + AtMostN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.RightParen]], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + AtLeastN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + AtMostN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.RightParen]], + ] + ], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class Is(BaseCompOp, BaseMatcherNode): + whitespace_before: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + whitespace_after: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class IsNot(BaseCompOp, BaseMatcherNode): + whitespace_before: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + whitespace_between: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + whitespace_after: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +ColonMatchType = Union["Colon", MetadataMatchType, MatchIfTrue[cst.Colon]] + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class Lambda(BaseExpression, BaseMatcherNode): + params: Union[ + ParametersMatchType, + DoNotCareSentinel, + OneOf[ParametersMatchType], + AllOf[ParametersMatchType], + ] = DoNotCare() + body: Union[ + BaseExpressionMatchType, + DoNotCareSentinel, + OneOf[BaseExpressionMatchType], + AllOf[BaseExpressionMatchType], + ] = DoNotCare() + colon: Union[ + ColonMatchType, DoNotCareSentinel, OneOf[ColonMatchType], AllOf[ColonMatchType] + ] = DoNotCare() + lpar: Union[ + Sequence[ + Union[ + LeftParenMatchType, + DoNotCareSentinel, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + AtLeastN[ + Union[ + LeftParenMatchType, + DoNotCareSentinel, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + AtMostN[ + Union[ + LeftParenMatchType, + DoNotCareSentinel, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + ] + ], + DoNotCareSentinel, + MatchIfTrue[Sequence[cst.LeftParen]], + OneOf[ + Union[ + Sequence[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + AtLeastN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + AtMostN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.LeftParen]], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + AtLeastN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + AtMostN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.LeftParen]], + ] + ], + ] = DoNotCare() + rpar: Union[ + Sequence[ + Union[ + RightParenMatchType, + DoNotCareSentinel, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + AtLeastN[ + Union[ + RightParenMatchType, + DoNotCareSentinel, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + AtMostN[ + Union[ + RightParenMatchType, + DoNotCareSentinel, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + ] + ], + DoNotCareSentinel, + MatchIfTrue[Sequence[cst.RightParen]], + OneOf[ + Union[ + Sequence[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + AtLeastN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + AtMostN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.RightParen]], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + AtLeastN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + AtMostN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.RightParen]], + ] + ], + ] = DoNotCare() + whitespace_after_lambda: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class LeftCurlyBrace(BaseMatcherNode): + whitespace_after: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class LeftParen(BaseMatcherNode): + whitespace_after: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class LeftShift(BaseBinaryOp, BaseMatcherNode): + whitespace_before: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + whitespace_after: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class LeftShiftAssign(BaseAugOp, BaseMatcherNode): + whitespace_before: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + whitespace_after: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class LeftSquareBracket(BaseMatcherNode): + whitespace_after: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class LessThan(BaseCompOp, BaseMatcherNode): + whitespace_before: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + whitespace_after: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class LessThanEqual(BaseCompOp, BaseMatcherNode): + whitespace_before: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + whitespace_after: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +BaseElementMatchType = Union[ + "BaseElement", MetadataMatchType, MatchIfTrue[cst.BaseElement] +] +LeftSquareBracketMatchType = Union[ + "LeftSquareBracket", MetadataMatchType, MatchIfTrue[cst.LeftSquareBracket] +] +RightSquareBracketMatchType = Union[ + "RightSquareBracket", MetadataMatchType, MatchIfTrue[cst.RightSquareBracket] +] + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class List( + BaseAssignTargetExpression, + BaseDelTargetExpression, + BaseExpression, + BaseList, + BaseMatcherNode, +): + elements: Union[ + Sequence[ + Union[ + BaseElementMatchType, + DoNotCareSentinel, + OneOf[BaseElementMatchType], + AllOf[BaseElementMatchType], + AtLeastN[ + Union[ + BaseElementMatchType, + DoNotCareSentinel, + OneOf[BaseElementMatchType], + AllOf[BaseElementMatchType], + ] + ], + AtMostN[ + Union[ + BaseElementMatchType, + DoNotCareSentinel, + OneOf[BaseElementMatchType], + AllOf[BaseElementMatchType], + ] + ], + ] + ], + DoNotCareSentinel, + MatchIfTrue[Sequence[cst.BaseElement]], + OneOf[ + Union[ + Sequence[ + Union[ + BaseElementMatchType, + OneOf[BaseElementMatchType], + AllOf[BaseElementMatchType], + AtLeastN[ + Union[ + BaseElementMatchType, + OneOf[BaseElementMatchType], + AllOf[BaseElementMatchType], + ] + ], + AtMostN[ + Union[ + BaseElementMatchType, + OneOf[BaseElementMatchType], + AllOf[BaseElementMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.BaseElement]], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + BaseElementMatchType, + OneOf[BaseElementMatchType], + AllOf[BaseElementMatchType], + AtLeastN[ + Union[ + BaseElementMatchType, + OneOf[BaseElementMatchType], + AllOf[BaseElementMatchType], + ] + ], + AtMostN[ + Union[ + BaseElementMatchType, + OneOf[BaseElementMatchType], + AllOf[BaseElementMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.BaseElement]], + ] + ], + ] = DoNotCare() + lbracket: Union[ + LeftSquareBracketMatchType, + DoNotCareSentinel, + OneOf[LeftSquareBracketMatchType], + AllOf[LeftSquareBracketMatchType], + ] = DoNotCare() + rbracket: Union[ + RightSquareBracketMatchType, + DoNotCareSentinel, + OneOf[RightSquareBracketMatchType], + AllOf[RightSquareBracketMatchType], + ] = DoNotCare() + lpar: Union[ + Sequence[ + Union[ + LeftParenMatchType, + DoNotCareSentinel, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + AtLeastN[ + Union[ + LeftParenMatchType, + DoNotCareSentinel, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + AtMostN[ + Union[ + LeftParenMatchType, + DoNotCareSentinel, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + ] + ], + DoNotCareSentinel, + MatchIfTrue[Sequence[cst.LeftParen]], + OneOf[ + Union[ + Sequence[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + AtLeastN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + AtMostN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.LeftParen]], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + AtLeastN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + AtMostN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.LeftParen]], + ] + ], + ] = DoNotCare() + rpar: Union[ + Sequence[ + Union[ + RightParenMatchType, + DoNotCareSentinel, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + AtLeastN[ + Union[ + RightParenMatchType, + DoNotCareSentinel, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + AtMostN[ + Union[ + RightParenMatchType, + DoNotCareSentinel, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + ] + ], + DoNotCareSentinel, + MatchIfTrue[Sequence[cst.RightParen]], + OneOf[ + Union[ + Sequence[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + AtLeastN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + AtMostN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.RightParen]], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + AtLeastN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + AtMostN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.RightParen]], + ] + ], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class ListComp(BaseComp, BaseExpression, BaseList, BaseSimpleComp, BaseMatcherNode): + elt: Union[ + BaseExpressionMatchType, + DoNotCareSentinel, + OneOf[BaseExpressionMatchType], + AllOf[BaseExpressionMatchType], + ] = DoNotCare() + for_in: Union[ + CompForMatchType, + DoNotCareSentinel, + OneOf[CompForMatchType], + AllOf[CompForMatchType], + ] = DoNotCare() + lbracket: Union[ + LeftSquareBracketMatchType, + DoNotCareSentinel, + OneOf[LeftSquareBracketMatchType], + AllOf[LeftSquareBracketMatchType], + ] = DoNotCare() + rbracket: Union[ + RightSquareBracketMatchType, + DoNotCareSentinel, + OneOf[RightSquareBracketMatchType], + AllOf[RightSquareBracketMatchType], + ] = DoNotCare() + lpar: Union[ + Sequence[ + Union[ + LeftParenMatchType, + DoNotCareSentinel, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + AtLeastN[ + Union[ + LeftParenMatchType, + DoNotCareSentinel, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + AtMostN[ + Union[ + LeftParenMatchType, + DoNotCareSentinel, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + ] + ], + DoNotCareSentinel, + MatchIfTrue[Sequence[cst.LeftParen]], + OneOf[ + Union[ + Sequence[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + AtLeastN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + AtMostN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.LeftParen]], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + AtLeastN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + AtMostN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.LeftParen]], + ] + ], + ] = DoNotCare() + rpar: Union[ + Sequence[ + Union[ + RightParenMatchType, + DoNotCareSentinel, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + AtLeastN[ + Union[ + RightParenMatchType, + DoNotCareSentinel, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + AtMostN[ + Union[ + RightParenMatchType, + DoNotCareSentinel, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + ] + ], + DoNotCareSentinel, + MatchIfTrue[Sequence[cst.RightParen]], + OneOf[ + Union[ + Sequence[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + AtLeastN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + AtMostN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.RightParen]], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + AtLeastN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + AtMostN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.RightParen]], + ] + ], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +MatchCaseMatchType = Union["MatchCase", MetadataMatchType, MatchIfTrue[cst.MatchCase]] + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class Match(BaseCompoundStatement, BaseStatement, BaseMatcherNode): + subject: Union[ + BaseExpressionMatchType, + DoNotCareSentinel, + OneOf[BaseExpressionMatchType], + AllOf[BaseExpressionMatchType], + ] = DoNotCare() + cases: Union[ + Sequence[ + Union[ + MatchCaseMatchType, + DoNotCareSentinel, + OneOf[MatchCaseMatchType], + AllOf[MatchCaseMatchType], + AtLeastN[ + Union[ + MatchCaseMatchType, + DoNotCareSentinel, + OneOf[MatchCaseMatchType], + AllOf[MatchCaseMatchType], + ] + ], + AtMostN[ + Union[ + MatchCaseMatchType, + DoNotCareSentinel, + OneOf[MatchCaseMatchType], + AllOf[MatchCaseMatchType], + ] + ], + ] + ], + DoNotCareSentinel, + MatchIfTrue[Sequence[cst.MatchCase]], + OneOf[ + Union[ + Sequence[ + Union[ + MatchCaseMatchType, + OneOf[MatchCaseMatchType], + AllOf[MatchCaseMatchType], + AtLeastN[ + Union[ + MatchCaseMatchType, + OneOf[MatchCaseMatchType], + AllOf[MatchCaseMatchType], + ] + ], + AtMostN[ + Union[ + MatchCaseMatchType, + OneOf[MatchCaseMatchType], + AllOf[MatchCaseMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.MatchCase]], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + MatchCaseMatchType, + OneOf[MatchCaseMatchType], + AllOf[MatchCaseMatchType], + AtLeastN[ + Union[ + MatchCaseMatchType, + OneOf[MatchCaseMatchType], + AllOf[MatchCaseMatchType], + ] + ], + AtMostN[ + Union[ + MatchCaseMatchType, + OneOf[MatchCaseMatchType], + AllOf[MatchCaseMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.MatchCase]], + ] + ], + ] = DoNotCare() + leading_lines: Union[ + Sequence[ + Union[ + EmptyLineMatchType, + DoNotCareSentinel, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + AtLeastN[ + Union[ + EmptyLineMatchType, + DoNotCareSentinel, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + AtMostN[ + Union[ + EmptyLineMatchType, + DoNotCareSentinel, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + ] + ], + DoNotCareSentinel, + MatchIfTrue[Sequence[cst.EmptyLine]], + OneOf[ + Union[ + Sequence[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + AtLeastN[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + AtMostN[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.EmptyLine]], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + AtLeastN[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + AtMostN[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.EmptyLine]], + ] + ], + ] = DoNotCare() + whitespace_after_match: Union[ + SimpleWhitespaceMatchType, + DoNotCareSentinel, + OneOf[SimpleWhitespaceMatchType], + AllOf[SimpleWhitespaceMatchType], + ] = DoNotCare() + whitespace_before_colon: Union[ + SimpleWhitespaceMatchType, + DoNotCareSentinel, + OneOf[SimpleWhitespaceMatchType], + AllOf[SimpleWhitespaceMatchType], + ] = DoNotCare() + whitespace_after_colon: Union[ + TrailingWhitespaceMatchType, + DoNotCareSentinel, + OneOf[TrailingWhitespaceMatchType], + AllOf[TrailingWhitespaceMatchType], + ] = DoNotCare() + indent: Union[ + Optional[str], + MetadataMatchType, + MatchIfTrue[Optional[str]], + DoNotCareSentinel, + OneOf[Union[Optional[str], MetadataMatchType, MatchIfTrue[Optional[str]]]], + AllOf[Union[Optional[str], MetadataMatchType, MatchIfTrue[Optional[str]]]], + ] = DoNotCare() + footer: Union[ + Sequence[ + Union[ + EmptyLineMatchType, + DoNotCareSentinel, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + AtLeastN[ + Union[ + EmptyLineMatchType, + DoNotCareSentinel, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + AtMostN[ + Union[ + EmptyLineMatchType, + DoNotCareSentinel, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + ] + ], + DoNotCareSentinel, + MatchIfTrue[Sequence[cst.EmptyLine]], + OneOf[ + Union[ + Sequence[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + AtLeastN[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + AtMostN[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.EmptyLine]], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + AtLeastN[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + AtMostN[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.EmptyLine]], + ] + ], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class MatchAs(BaseMatcherNode): + pattern: Union[ + Optional["MatchPattern"], + MetadataMatchType, + MatchIfTrue[Optional[cst.MatchPattern]], + DoNotCareSentinel, + OneOf[ + Union[ + Optional["MatchPattern"], + MetadataMatchType, + MatchIfTrue[Optional[cst.MatchPattern]], + ] + ], + AllOf[ + Union[ + Optional["MatchPattern"], + MetadataMatchType, + MatchIfTrue[Optional[cst.MatchPattern]], + ] + ], + ] = DoNotCare() + name: Union[ + Optional["Name"], + MetadataMatchType, + MatchIfTrue[Optional[cst.Name]], + DoNotCareSentinel, + OneOf[ + Union[Optional["Name"], MetadataMatchType, MatchIfTrue[Optional[cst.Name]]] + ], + AllOf[ + Union[Optional["Name"], MetadataMatchType, MatchIfTrue[Optional[cst.Name]]] + ], + ] = DoNotCare() + whitespace_before_as: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + whitespace_after_as: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + lpar: Union[ + Sequence[ + Union[ + LeftParenMatchType, + DoNotCareSentinel, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + AtLeastN[ + Union[ + LeftParenMatchType, + DoNotCareSentinel, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + AtMostN[ + Union[ + LeftParenMatchType, + DoNotCareSentinel, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + ] + ], + DoNotCareSentinel, + MatchIfTrue[Sequence[cst.LeftParen]], + OneOf[ + Union[ + Sequence[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + AtLeastN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + AtMostN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.LeftParen]], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + AtLeastN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + AtMostN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.LeftParen]], + ] + ], + ] = DoNotCare() + rpar: Union[ + Sequence[ + Union[ + RightParenMatchType, + DoNotCareSentinel, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + AtLeastN[ + Union[ + RightParenMatchType, + DoNotCareSentinel, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + AtMostN[ + Union[ + RightParenMatchType, + DoNotCareSentinel, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + ] + ], + DoNotCareSentinel, + MatchIfTrue[Sequence[cst.RightParen]], + OneOf[ + Union[ + Sequence[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + AtLeastN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + AtMostN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.RightParen]], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + AtLeastN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + AtMostN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.RightParen]], + ] + ], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +MatchPatternMatchType = Union[ + "MatchPattern", MetadataMatchType, MatchIfTrue[cst.MatchPattern] +] + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class MatchCase(BaseMatcherNode): + pattern: Union[ + MatchPatternMatchType, + DoNotCareSentinel, + OneOf[MatchPatternMatchType], + AllOf[MatchPatternMatchType], + ] = DoNotCare() + body: Union[ + BaseSuiteMatchType, + DoNotCareSentinel, + OneOf[BaseSuiteMatchType], + AllOf[BaseSuiteMatchType], + ] = DoNotCare() + guard: Union[ + Optional["BaseExpression"], + MetadataMatchType, + MatchIfTrue[Optional[cst.BaseExpression]], + DoNotCareSentinel, + OneOf[ + Union[ + Optional["BaseExpression"], + MetadataMatchType, + MatchIfTrue[Optional[cst.BaseExpression]], + ] + ], + AllOf[ + Union[ + Optional["BaseExpression"], + MetadataMatchType, + MatchIfTrue[Optional[cst.BaseExpression]], + ] + ], + ] = DoNotCare() + leading_lines: Union[ + Sequence[ + Union[ + EmptyLineMatchType, + DoNotCareSentinel, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + AtLeastN[ + Union[ + EmptyLineMatchType, + DoNotCareSentinel, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + AtMostN[ + Union[ + EmptyLineMatchType, + DoNotCareSentinel, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + ] + ], + DoNotCareSentinel, + MatchIfTrue[Sequence[cst.EmptyLine]], + OneOf[ + Union[ + Sequence[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + AtLeastN[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + AtMostN[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.EmptyLine]], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + AtLeastN[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + AtMostN[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.EmptyLine]], + ] + ], + ] = DoNotCare() + whitespace_after_case: Union[ + SimpleWhitespaceMatchType, + DoNotCareSentinel, + OneOf[SimpleWhitespaceMatchType], + AllOf[SimpleWhitespaceMatchType], + ] = DoNotCare() + whitespace_before_if: Union[ + SimpleWhitespaceMatchType, + DoNotCareSentinel, + OneOf[SimpleWhitespaceMatchType], + AllOf[SimpleWhitespaceMatchType], + ] = DoNotCare() + whitespace_after_if: Union[ + SimpleWhitespaceMatchType, + DoNotCareSentinel, + OneOf[SimpleWhitespaceMatchType], + AllOf[SimpleWhitespaceMatchType], + ] = DoNotCare() + whitespace_before_colon: Union[ + SimpleWhitespaceMatchType, + DoNotCareSentinel, + OneOf[SimpleWhitespaceMatchType], + AllOf[SimpleWhitespaceMatchType], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +MatchSequenceElementMatchType = Union[ + "MatchSequenceElement", MetadataMatchType, MatchIfTrue[cst.MatchSequenceElement] +] +MatchKeywordElementMatchType = Union[ + "MatchKeywordElement", MetadataMatchType, MatchIfTrue[cst.MatchKeywordElement] +] + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class MatchClass(BaseMatcherNode): + cls: Union[ + BaseExpressionMatchType, + DoNotCareSentinel, + OneOf[BaseExpressionMatchType], + AllOf[BaseExpressionMatchType], + ] = DoNotCare() + patterns: Union[ + Sequence[ + Union[ + MatchSequenceElementMatchType, + DoNotCareSentinel, + OneOf[MatchSequenceElementMatchType], + AllOf[MatchSequenceElementMatchType], + AtLeastN[ + Union[ + MatchSequenceElementMatchType, + DoNotCareSentinel, + OneOf[MatchSequenceElementMatchType], + AllOf[MatchSequenceElementMatchType], + ] + ], + AtMostN[ + Union[ + MatchSequenceElementMatchType, + DoNotCareSentinel, + OneOf[MatchSequenceElementMatchType], + AllOf[MatchSequenceElementMatchType], + ] + ], + ] + ], + DoNotCareSentinel, + MatchIfTrue[Sequence[cst.MatchSequenceElement]], + OneOf[ + Union[ + Sequence[ + Union[ + MatchSequenceElementMatchType, + OneOf[MatchSequenceElementMatchType], + AllOf[MatchSequenceElementMatchType], + AtLeastN[ + Union[ + MatchSequenceElementMatchType, + OneOf[MatchSequenceElementMatchType], + AllOf[MatchSequenceElementMatchType], + ] + ], + AtMostN[ + Union[ + MatchSequenceElementMatchType, + OneOf[MatchSequenceElementMatchType], + AllOf[MatchSequenceElementMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.MatchSequenceElement]], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + MatchSequenceElementMatchType, + OneOf[MatchSequenceElementMatchType], + AllOf[MatchSequenceElementMatchType], + AtLeastN[ + Union[ + MatchSequenceElementMatchType, + OneOf[MatchSequenceElementMatchType], + AllOf[MatchSequenceElementMatchType], + ] + ], + AtMostN[ + Union[ + MatchSequenceElementMatchType, + OneOf[MatchSequenceElementMatchType], + AllOf[MatchSequenceElementMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.MatchSequenceElement]], + ] + ], + ] = DoNotCare() + kwds: Union[ + Sequence[ + Union[ + MatchKeywordElementMatchType, + DoNotCareSentinel, + OneOf[MatchKeywordElementMatchType], + AllOf[MatchKeywordElementMatchType], + AtLeastN[ + Union[ + MatchKeywordElementMatchType, + DoNotCareSentinel, + OneOf[MatchKeywordElementMatchType], + AllOf[MatchKeywordElementMatchType], + ] + ], + AtMostN[ + Union[ + MatchKeywordElementMatchType, + DoNotCareSentinel, + OneOf[MatchKeywordElementMatchType], + AllOf[MatchKeywordElementMatchType], + ] + ], + ] + ], + DoNotCareSentinel, + MatchIfTrue[Sequence[cst.MatchKeywordElement]], + OneOf[ + Union[ + Sequence[ + Union[ + MatchKeywordElementMatchType, + OneOf[MatchKeywordElementMatchType], + AllOf[MatchKeywordElementMatchType], + AtLeastN[ + Union[ + MatchKeywordElementMatchType, + OneOf[MatchKeywordElementMatchType], + AllOf[MatchKeywordElementMatchType], + ] + ], + AtMostN[ + Union[ + MatchKeywordElementMatchType, + OneOf[MatchKeywordElementMatchType], + AllOf[MatchKeywordElementMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.MatchKeywordElement]], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + MatchKeywordElementMatchType, + OneOf[MatchKeywordElementMatchType], + AllOf[MatchKeywordElementMatchType], + AtLeastN[ + Union[ + MatchKeywordElementMatchType, + OneOf[MatchKeywordElementMatchType], + AllOf[MatchKeywordElementMatchType], + ] + ], + AtMostN[ + Union[ + MatchKeywordElementMatchType, + OneOf[MatchKeywordElementMatchType], + AllOf[MatchKeywordElementMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.MatchKeywordElement]], + ] + ], + ] = DoNotCare() + whitespace_after_cls: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + whitespace_before_patterns: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + whitespace_after_kwds: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + lpar: Union[ + Sequence[ + Union[ + LeftParenMatchType, + DoNotCareSentinel, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + AtLeastN[ + Union[ + LeftParenMatchType, + DoNotCareSentinel, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + AtMostN[ + Union[ + LeftParenMatchType, + DoNotCareSentinel, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + ] + ], + DoNotCareSentinel, + MatchIfTrue[Sequence[cst.LeftParen]], + OneOf[ + Union[ + Sequence[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + AtLeastN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + AtMostN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.LeftParen]], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + AtLeastN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + AtMostN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.LeftParen]], + ] + ], + ] = DoNotCare() + rpar: Union[ + Sequence[ + Union[ + RightParenMatchType, + DoNotCareSentinel, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + AtLeastN[ + Union[ + RightParenMatchType, + DoNotCareSentinel, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + AtMostN[ + Union[ + RightParenMatchType, + DoNotCareSentinel, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + ] + ], + DoNotCareSentinel, + MatchIfTrue[Sequence[cst.RightParen]], + OneOf[ + Union[ + Sequence[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + AtLeastN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + AtMostN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.RightParen]], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + AtLeastN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + AtMostN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.RightParen]], + ] + ], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class MatchKeywordElement(BaseMatcherNode): + key: Union[ + NameMatchType, DoNotCareSentinel, OneOf[NameMatchType], AllOf[NameMatchType] + ] = DoNotCare() + pattern: Union[ + MatchPatternMatchType, + DoNotCareSentinel, + OneOf[MatchPatternMatchType], + AllOf[MatchPatternMatchType], + ] = DoNotCare() + comma: Union[ + CommaMatchType, DoNotCareSentinel, OneOf[CommaMatchType], AllOf[CommaMatchType] + ] = DoNotCare() + whitespace_before_equal: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + whitespace_after_equal: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +MatchSequenceElementOrMatchStarMatchType = Union[ + "MatchSequenceElement", + "MatchStar", + MetadataMatchType, + MatchIfTrue[Union[cst.MatchSequenceElement, cst.MatchStar]], +] + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class MatchList(BaseMatcherNode): + patterns: Union[ + Sequence[ + Union[ + MatchSequenceElementOrMatchStarMatchType, + DoNotCareSentinel, + OneOf[MatchSequenceElementOrMatchStarMatchType], + AllOf[MatchSequenceElementOrMatchStarMatchType], + AtLeastN[ + Union[ + MatchSequenceElementOrMatchStarMatchType, + DoNotCareSentinel, + OneOf[MatchSequenceElementOrMatchStarMatchType], + AllOf[MatchSequenceElementOrMatchStarMatchType], + ] + ], + AtMostN[ + Union[ + MatchSequenceElementOrMatchStarMatchType, + DoNotCareSentinel, + OneOf[MatchSequenceElementOrMatchStarMatchType], + AllOf[MatchSequenceElementOrMatchStarMatchType], + ] + ], + ] + ], + DoNotCareSentinel, + MatchIfTrue[ + Sequence[ + Union[ + cst.MatchSequenceElement, + cst.MatchStar, + OneOf[Union[cst.MatchSequenceElement, cst.MatchStar]], + AllOf[Union[cst.MatchSequenceElement, cst.MatchStar]], + ] + ] + ], + OneOf[ + Union[ + Sequence[ + Union[ + MatchSequenceElementOrMatchStarMatchType, + OneOf[MatchSequenceElementOrMatchStarMatchType], + AllOf[MatchSequenceElementOrMatchStarMatchType], + AtLeastN[ + Union[ + MatchSequenceElementOrMatchStarMatchType, + OneOf[MatchSequenceElementOrMatchStarMatchType], + AllOf[MatchSequenceElementOrMatchStarMatchType], + ] + ], + AtMostN[ + Union[ + MatchSequenceElementOrMatchStarMatchType, + OneOf[MatchSequenceElementOrMatchStarMatchType], + AllOf[MatchSequenceElementOrMatchStarMatchType], + ] + ], + ] + ], + MatchIfTrue[ + Sequence[ + Union[ + cst.MatchSequenceElement, + cst.MatchStar, + OneOf[Union[cst.MatchSequenceElement, cst.MatchStar]], + AllOf[Union[cst.MatchSequenceElement, cst.MatchStar]], + ] + ] + ], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + MatchSequenceElementOrMatchStarMatchType, + OneOf[MatchSequenceElementOrMatchStarMatchType], + AllOf[MatchSequenceElementOrMatchStarMatchType], + AtLeastN[ + Union[ + MatchSequenceElementOrMatchStarMatchType, + OneOf[MatchSequenceElementOrMatchStarMatchType], + AllOf[MatchSequenceElementOrMatchStarMatchType], + ] + ], + AtMostN[ + Union[ + MatchSequenceElementOrMatchStarMatchType, + OneOf[MatchSequenceElementOrMatchStarMatchType], + AllOf[MatchSequenceElementOrMatchStarMatchType], + ] + ], + ] + ], + MatchIfTrue[ + Sequence[ + Union[ + cst.MatchSequenceElement, + cst.MatchStar, + OneOf[Union[cst.MatchSequenceElement, cst.MatchStar]], + AllOf[Union[cst.MatchSequenceElement, cst.MatchStar]], + ] + ] + ], + ] + ], + ] = DoNotCare() + lbracket: Union[ + Optional["LeftSquareBracket"], + MetadataMatchType, + MatchIfTrue[Optional[cst.LeftSquareBracket]], + DoNotCareSentinel, + OneOf[ + Union[ + Optional["LeftSquareBracket"], + MetadataMatchType, + MatchIfTrue[Optional[cst.LeftSquareBracket]], + ] + ], + AllOf[ + Union[ + Optional["LeftSquareBracket"], + MetadataMatchType, + MatchIfTrue[Optional[cst.LeftSquareBracket]], + ] + ], + ] = DoNotCare() + rbracket: Union[ + Optional["RightSquareBracket"], + MetadataMatchType, + MatchIfTrue[Optional[cst.RightSquareBracket]], + DoNotCareSentinel, + OneOf[ + Union[ + Optional["RightSquareBracket"], + MetadataMatchType, + MatchIfTrue[Optional[cst.RightSquareBracket]], + ] + ], + AllOf[ + Union[ + Optional["RightSquareBracket"], + MetadataMatchType, + MatchIfTrue[Optional[cst.RightSquareBracket]], + ] + ], + ] = DoNotCare() + lpar: Union[ + Sequence[ + Union[ + LeftParenMatchType, + DoNotCareSentinel, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + AtLeastN[ + Union[ + LeftParenMatchType, + DoNotCareSentinel, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + AtMostN[ + Union[ + LeftParenMatchType, + DoNotCareSentinel, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + ] + ], + DoNotCareSentinel, + MatchIfTrue[Sequence[cst.LeftParen]], + OneOf[ + Union[ + Sequence[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + AtLeastN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + AtMostN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.LeftParen]], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + AtLeastN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + AtMostN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.LeftParen]], + ] + ], + ] = DoNotCare() + rpar: Union[ + Sequence[ + Union[ + RightParenMatchType, + DoNotCareSentinel, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + AtLeastN[ + Union[ + RightParenMatchType, + DoNotCareSentinel, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + AtMostN[ + Union[ + RightParenMatchType, + DoNotCareSentinel, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + ] + ], + DoNotCareSentinel, + MatchIfTrue[Sequence[cst.RightParen]], + OneOf[ + Union[ + Sequence[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + AtLeastN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + AtMostN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.RightParen]], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + AtLeastN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + AtMostN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.RightParen]], + ] + ], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +MatchMappingElementMatchType = Union[ + "MatchMappingElement", MetadataMatchType, MatchIfTrue[cst.MatchMappingElement] +] + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class MatchMapping(BaseMatcherNode): + elements: Union[ + Sequence[ + Union[ + MatchMappingElementMatchType, + DoNotCareSentinel, + OneOf[MatchMappingElementMatchType], + AllOf[MatchMappingElementMatchType], + AtLeastN[ + Union[ + MatchMappingElementMatchType, + DoNotCareSentinel, + OneOf[MatchMappingElementMatchType], + AllOf[MatchMappingElementMatchType], + ] + ], + AtMostN[ + Union[ + MatchMappingElementMatchType, + DoNotCareSentinel, + OneOf[MatchMappingElementMatchType], + AllOf[MatchMappingElementMatchType], + ] + ], + ] + ], + DoNotCareSentinel, + MatchIfTrue[Sequence[cst.MatchMappingElement]], + OneOf[ + Union[ + Sequence[ + Union[ + MatchMappingElementMatchType, + OneOf[MatchMappingElementMatchType], + AllOf[MatchMappingElementMatchType], + AtLeastN[ + Union[ + MatchMappingElementMatchType, + OneOf[MatchMappingElementMatchType], + AllOf[MatchMappingElementMatchType], + ] + ], + AtMostN[ + Union[ + MatchMappingElementMatchType, + OneOf[MatchMappingElementMatchType], + AllOf[MatchMappingElementMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.MatchMappingElement]], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + MatchMappingElementMatchType, + OneOf[MatchMappingElementMatchType], + AllOf[MatchMappingElementMatchType], + AtLeastN[ + Union[ + MatchMappingElementMatchType, + OneOf[MatchMappingElementMatchType], + AllOf[MatchMappingElementMatchType], + ] + ], + AtMostN[ + Union[ + MatchMappingElementMatchType, + OneOf[MatchMappingElementMatchType], + AllOf[MatchMappingElementMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.MatchMappingElement]], + ] + ], + ] = DoNotCare() + lbrace: Union[ + LeftCurlyBraceMatchType, + DoNotCareSentinel, + OneOf[LeftCurlyBraceMatchType], + AllOf[LeftCurlyBraceMatchType], + ] = DoNotCare() + rbrace: Union[ + RightCurlyBraceMatchType, + DoNotCareSentinel, + OneOf[RightCurlyBraceMatchType], + AllOf[RightCurlyBraceMatchType], + ] = DoNotCare() + rest: Union[ + Optional["Name"], + MetadataMatchType, + MatchIfTrue[Optional[cst.Name]], + DoNotCareSentinel, + OneOf[ + Union[Optional["Name"], MetadataMatchType, MatchIfTrue[Optional[cst.Name]]] + ], + AllOf[ + Union[Optional["Name"], MetadataMatchType, MatchIfTrue[Optional[cst.Name]]] + ], + ] = DoNotCare() + whitespace_before_rest: Union[ + SimpleWhitespaceMatchType, + DoNotCareSentinel, + OneOf[SimpleWhitespaceMatchType], + AllOf[SimpleWhitespaceMatchType], + ] = DoNotCare() + trailing_comma: Union[ + Optional["Comma"], + MetadataMatchType, + MatchIfTrue[Optional[cst.Comma]], + DoNotCareSentinel, + OneOf[ + Union[ + Optional["Comma"], MetadataMatchType, MatchIfTrue[Optional[cst.Comma]] + ] + ], + AllOf[ + Union[ + Optional["Comma"], MetadataMatchType, MatchIfTrue[Optional[cst.Comma]] + ] + ], + ] = DoNotCare() + lpar: Union[ + Sequence[ + Union[ + LeftParenMatchType, + DoNotCareSentinel, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + AtLeastN[ + Union[ + LeftParenMatchType, + DoNotCareSentinel, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + AtMostN[ + Union[ + LeftParenMatchType, + DoNotCareSentinel, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + ] + ], + DoNotCareSentinel, + MatchIfTrue[Sequence[cst.LeftParen]], + OneOf[ + Union[ + Sequence[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + AtLeastN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + AtMostN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.LeftParen]], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + AtLeastN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + AtMostN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.LeftParen]], + ] + ], + ] = DoNotCare() + rpar: Union[ + Sequence[ + Union[ + RightParenMatchType, + DoNotCareSentinel, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + AtLeastN[ + Union[ + RightParenMatchType, + DoNotCareSentinel, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + AtMostN[ + Union[ + RightParenMatchType, + DoNotCareSentinel, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + ] + ], + DoNotCareSentinel, + MatchIfTrue[Sequence[cst.RightParen]], + OneOf[ + Union[ + Sequence[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + AtLeastN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + AtMostN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.RightParen]], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + AtLeastN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + AtMostN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.RightParen]], + ] + ], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class MatchMappingElement(BaseMatcherNode): + key: Union[ + BaseExpressionMatchType, + DoNotCareSentinel, + OneOf[BaseExpressionMatchType], + AllOf[BaseExpressionMatchType], + ] = DoNotCare() + pattern: Union[ + MatchPatternMatchType, + DoNotCareSentinel, + OneOf[MatchPatternMatchType], + AllOf[MatchPatternMatchType], + ] = DoNotCare() + comma: Union[ + CommaMatchType, DoNotCareSentinel, OneOf[CommaMatchType], AllOf[CommaMatchType] + ] = DoNotCare() + whitespace_before_colon: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + whitespace_after_colon: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +MatchOrElementMatchType = Union[ + "MatchOrElement", MetadataMatchType, MatchIfTrue[cst.MatchOrElement] +] + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class MatchOr(BaseMatcherNode): + patterns: Union[ + Sequence[ + Union[ + MatchOrElementMatchType, + DoNotCareSentinel, + OneOf[MatchOrElementMatchType], + AllOf[MatchOrElementMatchType], + AtLeastN[ + Union[ + MatchOrElementMatchType, + DoNotCareSentinel, + OneOf[MatchOrElementMatchType], + AllOf[MatchOrElementMatchType], + ] + ], + AtMostN[ + Union[ + MatchOrElementMatchType, + DoNotCareSentinel, + OneOf[MatchOrElementMatchType], + AllOf[MatchOrElementMatchType], + ] + ], + ] + ], + DoNotCareSentinel, + MatchIfTrue[Sequence[cst.MatchOrElement]], + OneOf[ + Union[ + Sequence[ + Union[ + MatchOrElementMatchType, + OneOf[MatchOrElementMatchType], + AllOf[MatchOrElementMatchType], + AtLeastN[ + Union[ + MatchOrElementMatchType, + OneOf[MatchOrElementMatchType], + AllOf[MatchOrElementMatchType], + ] + ], + AtMostN[ + Union[ + MatchOrElementMatchType, + OneOf[MatchOrElementMatchType], + AllOf[MatchOrElementMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.MatchOrElement]], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + MatchOrElementMatchType, + OneOf[MatchOrElementMatchType], + AllOf[MatchOrElementMatchType], + AtLeastN[ + Union[ + MatchOrElementMatchType, + OneOf[MatchOrElementMatchType], + AllOf[MatchOrElementMatchType], + ] + ], + AtMostN[ + Union[ + MatchOrElementMatchType, + OneOf[MatchOrElementMatchType], + AllOf[MatchOrElementMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.MatchOrElement]], + ] + ], + ] = DoNotCare() + lpar: Union[ + Sequence[ + Union[ + LeftParenMatchType, + DoNotCareSentinel, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + AtLeastN[ + Union[ + LeftParenMatchType, + DoNotCareSentinel, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + AtMostN[ + Union[ + LeftParenMatchType, + DoNotCareSentinel, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + ] + ], + DoNotCareSentinel, + MatchIfTrue[Sequence[cst.LeftParen]], + OneOf[ + Union[ + Sequence[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + AtLeastN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + AtMostN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.LeftParen]], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + AtLeastN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + AtMostN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.LeftParen]], + ] + ], + ] = DoNotCare() + rpar: Union[ + Sequence[ + Union[ + RightParenMatchType, + DoNotCareSentinel, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + AtLeastN[ + Union[ + RightParenMatchType, + DoNotCareSentinel, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + AtMostN[ + Union[ + RightParenMatchType, + DoNotCareSentinel, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + ] + ], + DoNotCareSentinel, + MatchIfTrue[Sequence[cst.RightParen]], + OneOf[ + Union[ + Sequence[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + AtLeastN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + AtMostN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.RightParen]], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + AtLeastN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + AtMostN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.RightParen]], + ] + ], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +BitOrMatchType = Union["BitOr", MetadataMatchType, MatchIfTrue[cst.BitOr]] + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class MatchOrElement(BaseMatcherNode): + pattern: Union[ + MatchPatternMatchType, + DoNotCareSentinel, + OneOf[MatchPatternMatchType], + AllOf[MatchPatternMatchType], + ] = DoNotCare() + separator: Union[ + BitOrMatchType, DoNotCareSentinel, OneOf[BitOrMatchType], AllOf[BitOrMatchType] + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class MatchPattern(BaseMatcherNode): + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class MatchSequence(BaseMatcherNode): + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class MatchSequenceElement(BaseMatcherNode): + value: Union[ + MatchPatternMatchType, + DoNotCareSentinel, + OneOf[MatchPatternMatchType], + AllOf[MatchPatternMatchType], + ] = DoNotCare() + comma: Union[ + CommaMatchType, DoNotCareSentinel, OneOf[CommaMatchType], AllOf[CommaMatchType] + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class MatchSingleton(BaseMatcherNode): + value: Union[ + NameMatchType, DoNotCareSentinel, OneOf[NameMatchType], AllOf[NameMatchType] + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class MatchStar(BaseMatcherNode): + name: Union[ + Optional["Name"], + MetadataMatchType, + MatchIfTrue[Optional[cst.Name]], + DoNotCareSentinel, + OneOf[ + Union[Optional["Name"], MetadataMatchType, MatchIfTrue[Optional[cst.Name]]] + ], + AllOf[ + Union[Optional["Name"], MetadataMatchType, MatchIfTrue[Optional[cst.Name]]] + ], + ] = DoNotCare() + comma: Union[ + CommaMatchType, DoNotCareSentinel, OneOf[CommaMatchType], AllOf[CommaMatchType] + ] = DoNotCare() + whitespace_before_name: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class MatchTuple(BaseMatcherNode): + patterns: Union[ + Sequence[ + Union[ + MatchSequenceElementOrMatchStarMatchType, + DoNotCareSentinel, + OneOf[MatchSequenceElementOrMatchStarMatchType], + AllOf[MatchSequenceElementOrMatchStarMatchType], + AtLeastN[ + Union[ + MatchSequenceElementOrMatchStarMatchType, + DoNotCareSentinel, + OneOf[MatchSequenceElementOrMatchStarMatchType], + AllOf[MatchSequenceElementOrMatchStarMatchType], + ] + ], + AtMostN[ + Union[ + MatchSequenceElementOrMatchStarMatchType, + DoNotCareSentinel, + OneOf[MatchSequenceElementOrMatchStarMatchType], + AllOf[MatchSequenceElementOrMatchStarMatchType], + ] + ], + ] + ], + DoNotCareSentinel, + MatchIfTrue[ + Sequence[ + Union[ + cst.MatchSequenceElement, + cst.MatchStar, + OneOf[Union[cst.MatchSequenceElement, cst.MatchStar]], + AllOf[Union[cst.MatchSequenceElement, cst.MatchStar]], + ] + ] + ], + OneOf[ + Union[ + Sequence[ + Union[ + MatchSequenceElementOrMatchStarMatchType, + OneOf[MatchSequenceElementOrMatchStarMatchType], + AllOf[MatchSequenceElementOrMatchStarMatchType], + AtLeastN[ + Union[ + MatchSequenceElementOrMatchStarMatchType, + OneOf[MatchSequenceElementOrMatchStarMatchType], + AllOf[MatchSequenceElementOrMatchStarMatchType], + ] + ], + AtMostN[ + Union[ + MatchSequenceElementOrMatchStarMatchType, + OneOf[MatchSequenceElementOrMatchStarMatchType], + AllOf[MatchSequenceElementOrMatchStarMatchType], + ] + ], + ] + ], + MatchIfTrue[ + Sequence[ + Union[ + cst.MatchSequenceElement, + cst.MatchStar, + OneOf[Union[cst.MatchSequenceElement, cst.MatchStar]], + AllOf[Union[cst.MatchSequenceElement, cst.MatchStar]], + ] + ] + ], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + MatchSequenceElementOrMatchStarMatchType, + OneOf[MatchSequenceElementOrMatchStarMatchType], + AllOf[MatchSequenceElementOrMatchStarMatchType], + AtLeastN[ + Union[ + MatchSequenceElementOrMatchStarMatchType, + OneOf[MatchSequenceElementOrMatchStarMatchType], + AllOf[MatchSequenceElementOrMatchStarMatchType], + ] + ], + AtMostN[ + Union[ + MatchSequenceElementOrMatchStarMatchType, + OneOf[MatchSequenceElementOrMatchStarMatchType], + AllOf[MatchSequenceElementOrMatchStarMatchType], + ] + ], + ] + ], + MatchIfTrue[ + Sequence[ + Union[ + cst.MatchSequenceElement, + cst.MatchStar, + OneOf[Union[cst.MatchSequenceElement, cst.MatchStar]], + AllOf[Union[cst.MatchSequenceElement, cst.MatchStar]], + ] + ] + ], + ] + ], + ] = DoNotCare() + lpar: Union[ + Sequence[ + Union[ + LeftParenMatchType, + DoNotCareSentinel, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + AtLeastN[ + Union[ + LeftParenMatchType, + DoNotCareSentinel, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + AtMostN[ + Union[ + LeftParenMatchType, + DoNotCareSentinel, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + ] + ], + DoNotCareSentinel, + MatchIfTrue[Sequence[cst.LeftParen]], + OneOf[ + Union[ + Sequence[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + AtLeastN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + AtMostN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.LeftParen]], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + AtLeastN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + AtMostN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.LeftParen]], + ] + ], + ] = DoNotCare() + rpar: Union[ + Sequence[ + Union[ + RightParenMatchType, + DoNotCareSentinel, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + AtLeastN[ + Union[ + RightParenMatchType, + DoNotCareSentinel, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + AtMostN[ + Union[ + RightParenMatchType, + DoNotCareSentinel, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + ] + ], + DoNotCareSentinel, + MatchIfTrue[Sequence[cst.RightParen]], + OneOf[ + Union[ + Sequence[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + AtLeastN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + AtMostN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.RightParen]], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + AtLeastN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + AtMostN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.RightParen]], + ] + ], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class MatchValue(BaseMatcherNode): + value: Union[ + BaseExpressionMatchType, + DoNotCareSentinel, + OneOf[BaseExpressionMatchType], + AllOf[BaseExpressionMatchType], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class MatrixMultiply(BaseBinaryOp, BaseMatcherNode): + whitespace_before: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + whitespace_after: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class MatrixMultiplyAssign(BaseAugOp, BaseMatcherNode): + whitespace_before: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + whitespace_after: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class Minus(BaseUnaryOp, BaseMatcherNode): + whitespace_after: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +SimpleStatementLineOrBaseCompoundStatementMatchType = Union[ + "SimpleStatementLine", + "BaseCompoundStatement", + MetadataMatchType, + MatchIfTrue[Union[cst.SimpleStatementLine, cst.BaseCompoundStatement]], +] + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class Module(BaseMatcherNode): + body: Union[ + Sequence[ + Union[ + SimpleStatementLineOrBaseCompoundStatementMatchType, + DoNotCareSentinel, + OneOf[SimpleStatementLineOrBaseCompoundStatementMatchType], + AllOf[SimpleStatementLineOrBaseCompoundStatementMatchType], + AtLeastN[ + Union[ + SimpleStatementLineOrBaseCompoundStatementMatchType, + DoNotCareSentinel, + OneOf[SimpleStatementLineOrBaseCompoundStatementMatchType], + AllOf[SimpleStatementLineOrBaseCompoundStatementMatchType], + ] + ], + AtMostN[ + Union[ + SimpleStatementLineOrBaseCompoundStatementMatchType, + DoNotCareSentinel, + OneOf[SimpleStatementLineOrBaseCompoundStatementMatchType], + AllOf[SimpleStatementLineOrBaseCompoundStatementMatchType], + ] + ], + ] + ], + DoNotCareSentinel, + MatchIfTrue[ + Sequence[ + Union[ + cst.SimpleStatementLine, + cst.BaseCompoundStatement, + OneOf[Union[cst.SimpleStatementLine, cst.BaseCompoundStatement]], + AllOf[Union[cst.SimpleStatementLine, cst.BaseCompoundStatement]], + ] + ] + ], + OneOf[ + Union[ + Sequence[ + Union[ + SimpleStatementLineOrBaseCompoundStatementMatchType, + OneOf[SimpleStatementLineOrBaseCompoundStatementMatchType], + AllOf[SimpleStatementLineOrBaseCompoundStatementMatchType], + AtLeastN[ + Union[ + SimpleStatementLineOrBaseCompoundStatementMatchType, + OneOf[ + SimpleStatementLineOrBaseCompoundStatementMatchType + ], + AllOf[ + SimpleStatementLineOrBaseCompoundStatementMatchType + ], + ] + ], + AtMostN[ + Union[ + SimpleStatementLineOrBaseCompoundStatementMatchType, + OneOf[ + SimpleStatementLineOrBaseCompoundStatementMatchType + ], + AllOf[ + SimpleStatementLineOrBaseCompoundStatementMatchType + ], + ] + ], + ] + ], + MatchIfTrue[ + Sequence[ + Union[ + cst.SimpleStatementLine, + cst.BaseCompoundStatement, + OneOf[ + Union[ + cst.SimpleStatementLine, cst.BaseCompoundStatement + ] + ], + AllOf[ + Union[ + cst.SimpleStatementLine, cst.BaseCompoundStatement + ] + ], + ] + ] + ], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + SimpleStatementLineOrBaseCompoundStatementMatchType, + OneOf[SimpleStatementLineOrBaseCompoundStatementMatchType], + AllOf[SimpleStatementLineOrBaseCompoundStatementMatchType], + AtLeastN[ + Union[ + SimpleStatementLineOrBaseCompoundStatementMatchType, + OneOf[ + SimpleStatementLineOrBaseCompoundStatementMatchType + ], + AllOf[ + SimpleStatementLineOrBaseCompoundStatementMatchType + ], + ] + ], + AtMostN[ + Union[ + SimpleStatementLineOrBaseCompoundStatementMatchType, + OneOf[ + SimpleStatementLineOrBaseCompoundStatementMatchType + ], + AllOf[ + SimpleStatementLineOrBaseCompoundStatementMatchType + ], + ] + ], + ] + ], + MatchIfTrue[ + Sequence[ + Union[ + cst.SimpleStatementLine, + cst.BaseCompoundStatement, + OneOf[ + Union[ + cst.SimpleStatementLine, cst.BaseCompoundStatement + ] + ], + AllOf[ + Union[ + cst.SimpleStatementLine, cst.BaseCompoundStatement + ] + ], + ] + ] + ], + ] + ], + ] = DoNotCare() + header: Union[ + Sequence[ + Union[ + EmptyLineMatchType, + DoNotCareSentinel, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + AtLeastN[ + Union[ + EmptyLineMatchType, + DoNotCareSentinel, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + AtMostN[ + Union[ + EmptyLineMatchType, + DoNotCareSentinel, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + ] + ], + DoNotCareSentinel, + MatchIfTrue[Sequence[cst.EmptyLine]], + OneOf[ + Union[ + Sequence[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + AtLeastN[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + AtMostN[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.EmptyLine]], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + AtLeastN[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + AtMostN[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.EmptyLine]], + ] + ], + ] = DoNotCare() + footer: Union[ + Sequence[ + Union[ + EmptyLineMatchType, + DoNotCareSentinel, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + AtLeastN[ + Union[ + EmptyLineMatchType, + DoNotCareSentinel, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + AtMostN[ + Union[ + EmptyLineMatchType, + DoNotCareSentinel, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + ] + ], + DoNotCareSentinel, + MatchIfTrue[Sequence[cst.EmptyLine]], + OneOf[ + Union[ + Sequence[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + AtLeastN[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + AtMostN[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.EmptyLine]], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + AtLeastN[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + AtMostN[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.EmptyLine]], + ] + ], + ] = DoNotCare() + encoding: Union[ + strMatchType, DoNotCareSentinel, OneOf[strMatchType], AllOf[strMatchType] + ] = DoNotCare() + default_indent: Union[ + strMatchType, DoNotCareSentinel, OneOf[strMatchType], AllOf[strMatchType] + ] = DoNotCare() + default_newline: Union[ + strMatchType, DoNotCareSentinel, OneOf[strMatchType], AllOf[strMatchType] + ] = DoNotCare() + has_trailing_newline: Union[ + boolMatchType, DoNotCareSentinel, OneOf[boolMatchType], AllOf[boolMatchType] + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class Modulo(BaseBinaryOp, BaseMatcherNode): + whitespace_before: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + whitespace_after: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class ModuloAssign(BaseAugOp, BaseMatcherNode): + whitespace_before: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + whitespace_after: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class Multiply(BaseBinaryOp, BaseMatcherNode): + whitespace_before: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + whitespace_after: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class MultiplyAssign(BaseAugOp, BaseMatcherNode): + whitespace_before: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + whitespace_after: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class Name( + BaseAssignTargetExpression, BaseDelTargetExpression, BaseExpression, BaseMatcherNode +): + value: Union[ + strMatchType, DoNotCareSentinel, OneOf[strMatchType], AllOf[strMatchType] + ] = DoNotCare() + lpar: Union[ + Sequence[ + Union[ + LeftParenMatchType, + DoNotCareSentinel, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + AtLeastN[ + Union[ + LeftParenMatchType, + DoNotCareSentinel, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + AtMostN[ + Union[ + LeftParenMatchType, + DoNotCareSentinel, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + ] + ], + DoNotCareSentinel, + MatchIfTrue[Sequence[cst.LeftParen]], + OneOf[ + Union[ + Sequence[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + AtLeastN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + AtMostN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.LeftParen]], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + AtLeastN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + AtMostN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.LeftParen]], + ] + ], + ] = DoNotCare() + rpar: Union[ + Sequence[ + Union[ + RightParenMatchType, + DoNotCareSentinel, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + AtLeastN[ + Union[ + RightParenMatchType, + DoNotCareSentinel, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + AtMostN[ + Union[ + RightParenMatchType, + DoNotCareSentinel, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + ] + ], + DoNotCareSentinel, + MatchIfTrue[Sequence[cst.RightParen]], + OneOf[ + Union[ + Sequence[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + AtLeastN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + AtMostN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.RightParen]], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + AtLeastN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + AtMostN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.RightParen]], + ] + ], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class NameItem(BaseMatcherNode): + name: Union[ + NameMatchType, DoNotCareSentinel, OneOf[NameMatchType], AllOf[NameMatchType] + ] = DoNotCare() + comma: Union[ + CommaMatchType, DoNotCareSentinel, OneOf[CommaMatchType], AllOf[CommaMatchType] + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class NamedExpr(BaseExpression, BaseMatcherNode): + target: Union[ + BaseExpressionMatchType, + DoNotCareSentinel, + OneOf[BaseExpressionMatchType], + AllOf[BaseExpressionMatchType], + ] = DoNotCare() + value: Union[ + BaseExpressionMatchType, + DoNotCareSentinel, + OneOf[BaseExpressionMatchType], + AllOf[BaseExpressionMatchType], + ] = DoNotCare() + lpar: Union[ + Sequence[ + Union[ + LeftParenMatchType, + DoNotCareSentinel, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + AtLeastN[ + Union[ + LeftParenMatchType, + DoNotCareSentinel, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + AtMostN[ + Union[ + LeftParenMatchType, + DoNotCareSentinel, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + ] + ], + DoNotCareSentinel, + MatchIfTrue[Sequence[cst.LeftParen]], + OneOf[ + Union[ + Sequence[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + AtLeastN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + AtMostN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.LeftParen]], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + AtLeastN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + AtMostN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.LeftParen]], + ] + ], + ] = DoNotCare() + rpar: Union[ + Sequence[ + Union[ + RightParenMatchType, + DoNotCareSentinel, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + AtLeastN[ + Union[ + RightParenMatchType, + DoNotCareSentinel, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + AtMostN[ + Union[ + RightParenMatchType, + DoNotCareSentinel, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + ] + ], + DoNotCareSentinel, + MatchIfTrue[Sequence[cst.RightParen]], + OneOf[ + Union[ + Sequence[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + AtLeastN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + AtMostN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.RightParen]], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + AtLeastN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + AtMostN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.RightParen]], + ] + ], + ] = DoNotCare() + whitespace_before_walrus: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + whitespace_after_walrus: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class Newline(BaseMatcherNode): + value: Union[ + Optional[str], + MetadataMatchType, + MatchIfTrue[Optional[str]], + DoNotCareSentinel, + OneOf[Union[Optional[str], MetadataMatchType, MatchIfTrue[Optional[str]]]], + AllOf[Union[Optional[str], MetadataMatchType, MatchIfTrue[Optional[str]]]], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class Nonlocal(BaseSmallStatement, BaseMatcherNode): + names: Union[ + Sequence[ + Union[ + NameItemMatchType, + DoNotCareSentinel, + OneOf[NameItemMatchType], + AllOf[NameItemMatchType], + AtLeastN[ + Union[ + NameItemMatchType, + DoNotCareSentinel, + OneOf[NameItemMatchType], + AllOf[NameItemMatchType], + ] + ], + AtMostN[ + Union[ + NameItemMatchType, + DoNotCareSentinel, + OneOf[NameItemMatchType], + AllOf[NameItemMatchType], + ] + ], + ] + ], + DoNotCareSentinel, + MatchIfTrue[Sequence[cst.NameItem]], + OneOf[ + Union[ + Sequence[ + Union[ + NameItemMatchType, + OneOf[NameItemMatchType], + AllOf[NameItemMatchType], + AtLeastN[ + Union[ + NameItemMatchType, + OneOf[NameItemMatchType], + AllOf[NameItemMatchType], + ] + ], + AtMostN[ + Union[ + NameItemMatchType, + OneOf[NameItemMatchType], + AllOf[NameItemMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.NameItem]], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + NameItemMatchType, + OneOf[NameItemMatchType], + AllOf[NameItemMatchType], + AtLeastN[ + Union[ + NameItemMatchType, + OneOf[NameItemMatchType], + AllOf[NameItemMatchType], + ] + ], + AtMostN[ + Union[ + NameItemMatchType, + OneOf[NameItemMatchType], + AllOf[NameItemMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.NameItem]], + ] + ], + ] = DoNotCare() + whitespace_after_nonlocal: Union[ + SimpleWhitespaceMatchType, + DoNotCareSentinel, + OneOf[SimpleWhitespaceMatchType], + AllOf[SimpleWhitespaceMatchType], + ] = DoNotCare() + semicolon: Union[ + SemicolonMatchType, + DoNotCareSentinel, + OneOf[SemicolonMatchType], + AllOf[SemicolonMatchType], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class Not(BaseUnaryOp, BaseMatcherNode): + whitespace_after: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class NotEqual(BaseCompOp, BaseMatcherNode): + value: Union[ + strMatchType, DoNotCareSentinel, OneOf[strMatchType], AllOf[strMatchType] + ] = DoNotCare() + whitespace_before: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + whitespace_after: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class NotIn(BaseCompOp, BaseMatcherNode): + whitespace_before: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + whitespace_between: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + whitespace_after: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class Or(BaseBooleanOp, BaseMatcherNode): + whitespace_before: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + whitespace_after: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class Param(BaseMatcherNode): + name: Union[ + NameMatchType, DoNotCareSentinel, OneOf[NameMatchType], AllOf[NameMatchType] + ] = DoNotCare() + annotation: Union[ + Optional["Annotation"], + MetadataMatchType, + MatchIfTrue[Optional[cst.Annotation]], + DoNotCareSentinel, + OneOf[ + Union[ + Optional["Annotation"], + MetadataMatchType, + MatchIfTrue[Optional[cst.Annotation]], + ] + ], + AllOf[ + Union[ + Optional["Annotation"], + MetadataMatchType, + MatchIfTrue[Optional[cst.Annotation]], + ] + ], + ] = DoNotCare() + equal: Union[ + AssignEqualMatchType, + DoNotCareSentinel, + OneOf[AssignEqualMatchType], + AllOf[AssignEqualMatchType], + ] = DoNotCare() + default: Union[ + Optional["BaseExpression"], + MetadataMatchType, + MatchIfTrue[Optional[cst.BaseExpression]], + DoNotCareSentinel, + OneOf[ + Union[ + Optional["BaseExpression"], + MetadataMatchType, + MatchIfTrue[Optional[cst.BaseExpression]], + ] + ], + AllOf[ + Union[ + Optional["BaseExpression"], + MetadataMatchType, + MatchIfTrue[Optional[cst.BaseExpression]], + ] + ], + ] = DoNotCare() + comma: Union[ + CommaMatchType, DoNotCareSentinel, OneOf[CommaMatchType], AllOf[CommaMatchType] + ] = DoNotCare() + star: Union[ + strMatchType, DoNotCareSentinel, OneOf[strMatchType], AllOf[strMatchType] + ] = DoNotCare() + whitespace_after_star: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + whitespace_after_param: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class ParamSlash(BaseMatcherNode): + comma: Union[ + CommaMatchType, DoNotCareSentinel, OneOf[CommaMatchType], AllOf[CommaMatchType] + ] = DoNotCare() + whitespace_after: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class ParamSpec(BaseMatcherNode): + name: Union[ + NameMatchType, DoNotCareSentinel, OneOf[NameMatchType], AllOf[NameMatchType] + ] = DoNotCare() + whitespace_after_star: Union[ + SimpleWhitespaceMatchType, + DoNotCareSentinel, + OneOf[SimpleWhitespaceMatchType], + AllOf[SimpleWhitespaceMatchType], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class ParamStar(BaseMatcherNode): + comma: Union[ + CommaMatchType, DoNotCareSentinel, OneOf[CommaMatchType], AllOf[CommaMatchType] + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +ParamMatchType = Union["Param", MetadataMatchType, MatchIfTrue[cst.Param]] +ParamOrParamStarMatchType = Union[ + "Param", + "ParamStar", + MetadataMatchType, + MatchIfTrue[Union[cst.Param, cst.ParamStar]], +] +ParamSlashMatchType = Union[ + "ParamSlash", MetadataMatchType, MatchIfTrue[cst.ParamSlash] +] + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class Parameters(BaseMatcherNode): + params: Union[ + Sequence[ + Union[ + ParamMatchType, + DoNotCareSentinel, + OneOf[ParamMatchType], + AllOf[ParamMatchType], + AtLeastN[ + Union[ + ParamMatchType, + DoNotCareSentinel, + OneOf[ParamMatchType], + AllOf[ParamMatchType], + ] + ], + AtMostN[ + Union[ + ParamMatchType, + DoNotCareSentinel, + OneOf[ParamMatchType], + AllOf[ParamMatchType], + ] + ], + ] + ], + DoNotCareSentinel, + MatchIfTrue[Sequence[cst.Param]], + OneOf[ + Union[ + Sequence[ + Union[ + ParamMatchType, + OneOf[ParamMatchType], + AllOf[ParamMatchType], + AtLeastN[ + Union[ + ParamMatchType, + OneOf[ParamMatchType], + AllOf[ParamMatchType], + ] + ], + AtMostN[ + Union[ + ParamMatchType, + OneOf[ParamMatchType], + AllOf[ParamMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.Param]], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + ParamMatchType, + OneOf[ParamMatchType], + AllOf[ParamMatchType], + AtLeastN[ + Union[ + ParamMatchType, + OneOf[ParamMatchType], + AllOf[ParamMatchType], + ] + ], + AtMostN[ + Union[ + ParamMatchType, + OneOf[ParamMatchType], + AllOf[ParamMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.Param]], + ] + ], + ] = DoNotCare() + star_arg: Union[ + ParamOrParamStarMatchType, + DoNotCareSentinel, + OneOf[ParamOrParamStarMatchType], + AllOf[ParamOrParamStarMatchType], + ] = DoNotCare() + kwonly_params: Union[ + Sequence[ + Union[ + ParamMatchType, + DoNotCareSentinel, + OneOf[ParamMatchType], + AllOf[ParamMatchType], + AtLeastN[ + Union[ + ParamMatchType, + DoNotCareSentinel, + OneOf[ParamMatchType], + AllOf[ParamMatchType], + ] + ], + AtMostN[ + Union[ + ParamMatchType, + DoNotCareSentinel, + OneOf[ParamMatchType], + AllOf[ParamMatchType], + ] + ], + ] + ], + DoNotCareSentinel, + MatchIfTrue[Sequence[cst.Param]], + OneOf[ + Union[ + Sequence[ + Union[ + ParamMatchType, + OneOf[ParamMatchType], + AllOf[ParamMatchType], + AtLeastN[ + Union[ + ParamMatchType, + OneOf[ParamMatchType], + AllOf[ParamMatchType], + ] + ], + AtMostN[ + Union[ + ParamMatchType, + OneOf[ParamMatchType], + AllOf[ParamMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.Param]], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + ParamMatchType, + OneOf[ParamMatchType], + AllOf[ParamMatchType], + AtLeastN[ + Union[ + ParamMatchType, + OneOf[ParamMatchType], + AllOf[ParamMatchType], + ] + ], + AtMostN[ + Union[ + ParamMatchType, + OneOf[ParamMatchType], + AllOf[ParamMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.Param]], + ] + ], + ] = DoNotCare() + star_kwarg: Union[ + Optional["Param"], + MetadataMatchType, + MatchIfTrue[Optional[cst.Param]], + DoNotCareSentinel, + OneOf[ + Union[ + Optional["Param"], MetadataMatchType, MatchIfTrue[Optional[cst.Param]] + ] + ], + AllOf[ + Union[ + Optional["Param"], MetadataMatchType, MatchIfTrue[Optional[cst.Param]] + ] + ], + ] = DoNotCare() + posonly_params: Union[ + Sequence[ + Union[ + ParamMatchType, + DoNotCareSentinel, + OneOf[ParamMatchType], + AllOf[ParamMatchType], + AtLeastN[ + Union[ + ParamMatchType, + DoNotCareSentinel, + OneOf[ParamMatchType], + AllOf[ParamMatchType], + ] + ], + AtMostN[ + Union[ + ParamMatchType, + DoNotCareSentinel, + OneOf[ParamMatchType], + AllOf[ParamMatchType], + ] + ], + ] + ], + DoNotCareSentinel, + MatchIfTrue[Sequence[cst.Param]], + OneOf[ + Union[ + Sequence[ + Union[ + ParamMatchType, + OneOf[ParamMatchType], + AllOf[ParamMatchType], + AtLeastN[ + Union[ + ParamMatchType, + OneOf[ParamMatchType], + AllOf[ParamMatchType], + ] + ], + AtMostN[ + Union[ + ParamMatchType, + OneOf[ParamMatchType], + AllOf[ParamMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.Param]], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + ParamMatchType, + OneOf[ParamMatchType], + AllOf[ParamMatchType], + AtLeastN[ + Union[ + ParamMatchType, + OneOf[ParamMatchType], + AllOf[ParamMatchType], + ] + ], + AtMostN[ + Union[ + ParamMatchType, + OneOf[ParamMatchType], + AllOf[ParamMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.Param]], + ] + ], + ] = DoNotCare() + posonly_ind: Union[ + ParamSlashMatchType, + DoNotCareSentinel, + OneOf[ParamSlashMatchType], + AllOf[ParamSlashMatchType], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class ParenthesizedWhitespace(BaseParenthesizableWhitespace, BaseMatcherNode): + first_line: Union[ + TrailingWhitespaceMatchType, + DoNotCareSentinel, + OneOf[TrailingWhitespaceMatchType], + AllOf[TrailingWhitespaceMatchType], + ] = DoNotCare() + empty_lines: Union[ + Sequence[ + Union[ + EmptyLineMatchType, + DoNotCareSentinel, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + AtLeastN[ + Union[ + EmptyLineMatchType, + DoNotCareSentinel, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + AtMostN[ + Union[ + EmptyLineMatchType, + DoNotCareSentinel, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + ] + ], + DoNotCareSentinel, + MatchIfTrue[Sequence[cst.EmptyLine]], + OneOf[ + Union[ + Sequence[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + AtLeastN[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + AtMostN[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.EmptyLine]], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + AtLeastN[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + AtMostN[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.EmptyLine]], + ] + ], + ] = DoNotCare() + indent: Union[ + boolMatchType, DoNotCareSentinel, OneOf[boolMatchType], AllOf[boolMatchType] + ] = DoNotCare() + last_line: Union[ + SimpleWhitespaceMatchType, + DoNotCareSentinel, + OneOf[SimpleWhitespaceMatchType], + AllOf[SimpleWhitespaceMatchType], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class Pass(BaseSmallStatement, BaseMatcherNode): + semicolon: Union[ + SemicolonMatchType, + DoNotCareSentinel, + OneOf[SemicolonMatchType], + AllOf[SemicolonMatchType], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class Plus(BaseUnaryOp, BaseMatcherNode): + whitespace_after: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class Power(BaseBinaryOp, BaseMatcherNode): + whitespace_before: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + whitespace_after: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class PowerAssign(BaseAugOp, BaseMatcherNode): + whitespace_before: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + whitespace_after: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class Raise(BaseSmallStatement, BaseMatcherNode): + exc: Union[ + Optional["BaseExpression"], + MetadataMatchType, + MatchIfTrue[Optional[cst.BaseExpression]], + DoNotCareSentinel, + OneOf[ + Union[ + Optional["BaseExpression"], + MetadataMatchType, + MatchIfTrue[Optional[cst.BaseExpression]], + ] + ], + AllOf[ + Union[ + Optional["BaseExpression"], + MetadataMatchType, + MatchIfTrue[Optional[cst.BaseExpression]], + ] + ], + ] = DoNotCare() + cause: Union[ + Optional["From"], + MetadataMatchType, + MatchIfTrue[Optional[cst.From]], + DoNotCareSentinel, + OneOf[ + Union[Optional["From"], MetadataMatchType, MatchIfTrue[Optional[cst.From]]] + ], + AllOf[ + Union[Optional["From"], MetadataMatchType, MatchIfTrue[Optional[cst.From]]] + ], + ] = DoNotCare() + whitespace_after_raise: Union[ + SimpleWhitespaceMatchType, + DoNotCareSentinel, + OneOf[SimpleWhitespaceMatchType], + AllOf[SimpleWhitespaceMatchType], + ] = DoNotCare() + semicolon: Union[ + SemicolonMatchType, + DoNotCareSentinel, + OneOf[SemicolonMatchType], + AllOf[SemicolonMatchType], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class Return(BaseSmallStatement, BaseMatcherNode): + value: Union[ + Optional["BaseExpression"], + MetadataMatchType, + MatchIfTrue[Optional[cst.BaseExpression]], + DoNotCareSentinel, + OneOf[ + Union[ + Optional["BaseExpression"], + MetadataMatchType, + MatchIfTrue[Optional[cst.BaseExpression]], + ] + ], + AllOf[ + Union[ + Optional["BaseExpression"], + MetadataMatchType, + MatchIfTrue[Optional[cst.BaseExpression]], + ] + ], + ] = DoNotCare() + whitespace_after_return: Union[ + SimpleWhitespaceMatchType, + DoNotCareSentinel, + OneOf[SimpleWhitespaceMatchType], + AllOf[SimpleWhitespaceMatchType], + ] = DoNotCare() + semicolon: Union[ + SemicolonMatchType, + DoNotCareSentinel, + OneOf[SemicolonMatchType], + AllOf[SemicolonMatchType], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class RightCurlyBrace(BaseMatcherNode): + whitespace_before: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class RightParen(BaseMatcherNode): + whitespace_before: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class RightShift(BaseBinaryOp, BaseMatcherNode): + whitespace_before: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + whitespace_after: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class RightShiftAssign(BaseAugOp, BaseMatcherNode): + whitespace_before: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + whitespace_after: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class RightSquareBracket(BaseMatcherNode): + whitespace_before: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class Semicolon(BaseMatcherNode): + whitespace_before: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + whitespace_after: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class Set(BaseExpression, BaseSet, BaseMatcherNode): + elements: Union[ + Sequence[ + Union[ + BaseElementMatchType, + DoNotCareSentinel, + OneOf[BaseElementMatchType], + AllOf[BaseElementMatchType], + AtLeastN[ + Union[ + BaseElementMatchType, + DoNotCareSentinel, + OneOf[BaseElementMatchType], + AllOf[BaseElementMatchType], + ] + ], + AtMostN[ + Union[ + BaseElementMatchType, + DoNotCareSentinel, + OneOf[BaseElementMatchType], + AllOf[BaseElementMatchType], + ] + ], + ] + ], + DoNotCareSentinel, + MatchIfTrue[Sequence[cst.BaseElement]], + OneOf[ + Union[ + Sequence[ + Union[ + BaseElementMatchType, + OneOf[BaseElementMatchType], + AllOf[BaseElementMatchType], + AtLeastN[ + Union[ + BaseElementMatchType, + OneOf[BaseElementMatchType], + AllOf[BaseElementMatchType], + ] + ], + AtMostN[ + Union[ + BaseElementMatchType, + OneOf[BaseElementMatchType], + AllOf[BaseElementMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.BaseElement]], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + BaseElementMatchType, + OneOf[BaseElementMatchType], + AllOf[BaseElementMatchType], + AtLeastN[ + Union[ + BaseElementMatchType, + OneOf[BaseElementMatchType], + AllOf[BaseElementMatchType], + ] + ], + AtMostN[ + Union[ + BaseElementMatchType, + OneOf[BaseElementMatchType], + AllOf[BaseElementMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.BaseElement]], + ] + ], + ] = DoNotCare() + lbrace: Union[ + LeftCurlyBraceMatchType, + DoNotCareSentinel, + OneOf[LeftCurlyBraceMatchType], + AllOf[LeftCurlyBraceMatchType], + ] = DoNotCare() + rbrace: Union[ + RightCurlyBraceMatchType, + DoNotCareSentinel, + OneOf[RightCurlyBraceMatchType], + AllOf[RightCurlyBraceMatchType], + ] = DoNotCare() + lpar: Union[ + Sequence[ + Union[ + LeftParenMatchType, + DoNotCareSentinel, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + AtLeastN[ + Union[ + LeftParenMatchType, + DoNotCareSentinel, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + AtMostN[ + Union[ + LeftParenMatchType, + DoNotCareSentinel, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + ] + ], + DoNotCareSentinel, + MatchIfTrue[Sequence[cst.LeftParen]], + OneOf[ + Union[ + Sequence[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + AtLeastN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + AtMostN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.LeftParen]], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + AtLeastN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + AtMostN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.LeftParen]], + ] + ], + ] = DoNotCare() + rpar: Union[ + Sequence[ + Union[ + RightParenMatchType, + DoNotCareSentinel, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + AtLeastN[ + Union[ + RightParenMatchType, + DoNotCareSentinel, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + AtMostN[ + Union[ + RightParenMatchType, + DoNotCareSentinel, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + ] + ], + DoNotCareSentinel, + MatchIfTrue[Sequence[cst.RightParen]], + OneOf[ + Union[ + Sequence[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + AtLeastN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + AtMostN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.RightParen]], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + AtLeastN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + AtMostN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.RightParen]], + ] + ], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class SetComp(BaseComp, BaseExpression, BaseSet, BaseSimpleComp, BaseMatcherNode): + elt: Union[ + BaseExpressionMatchType, + DoNotCareSentinel, + OneOf[BaseExpressionMatchType], + AllOf[BaseExpressionMatchType], + ] = DoNotCare() + for_in: Union[ + CompForMatchType, + DoNotCareSentinel, + OneOf[CompForMatchType], + AllOf[CompForMatchType], + ] = DoNotCare() + lbrace: Union[ + LeftCurlyBraceMatchType, + DoNotCareSentinel, + OneOf[LeftCurlyBraceMatchType], + AllOf[LeftCurlyBraceMatchType], + ] = DoNotCare() + rbrace: Union[ + RightCurlyBraceMatchType, + DoNotCareSentinel, + OneOf[RightCurlyBraceMatchType], + AllOf[RightCurlyBraceMatchType], + ] = DoNotCare() + lpar: Union[ + Sequence[ + Union[ + LeftParenMatchType, + DoNotCareSentinel, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + AtLeastN[ + Union[ + LeftParenMatchType, + DoNotCareSentinel, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + AtMostN[ + Union[ + LeftParenMatchType, + DoNotCareSentinel, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + ] + ], + DoNotCareSentinel, + MatchIfTrue[Sequence[cst.LeftParen]], + OneOf[ + Union[ + Sequence[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + AtLeastN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + AtMostN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.LeftParen]], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + AtLeastN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + AtMostN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.LeftParen]], + ] + ], + ] = DoNotCare() + rpar: Union[ + Sequence[ + Union[ + RightParenMatchType, + DoNotCareSentinel, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + AtLeastN[ + Union[ + RightParenMatchType, + DoNotCareSentinel, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + AtMostN[ + Union[ + RightParenMatchType, + DoNotCareSentinel, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + ] + ], + DoNotCareSentinel, + MatchIfTrue[Sequence[cst.RightParen]], + OneOf[ + Union[ + Sequence[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + AtLeastN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + AtMostN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.RightParen]], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + AtLeastN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + AtMostN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.RightParen]], + ] + ], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +BaseSmallStatementMatchType = Union[ + "BaseSmallStatement", MetadataMatchType, MatchIfTrue[cst.BaseSmallStatement] +] + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class SimpleStatementLine(BaseStatement, BaseMatcherNode): + body: Union[ + Sequence[ + Union[ + BaseSmallStatementMatchType, + DoNotCareSentinel, + OneOf[BaseSmallStatementMatchType], + AllOf[BaseSmallStatementMatchType], + AtLeastN[ + Union[ + BaseSmallStatementMatchType, + DoNotCareSentinel, + OneOf[BaseSmallStatementMatchType], + AllOf[BaseSmallStatementMatchType], + ] + ], + AtMostN[ + Union[ + BaseSmallStatementMatchType, + DoNotCareSentinel, + OneOf[BaseSmallStatementMatchType], + AllOf[BaseSmallStatementMatchType], + ] + ], + ] + ], + DoNotCareSentinel, + MatchIfTrue[Sequence[cst.BaseSmallStatement]], + OneOf[ + Union[ + Sequence[ + Union[ + BaseSmallStatementMatchType, + OneOf[BaseSmallStatementMatchType], + AllOf[BaseSmallStatementMatchType], + AtLeastN[ + Union[ + BaseSmallStatementMatchType, + OneOf[BaseSmallStatementMatchType], + AllOf[BaseSmallStatementMatchType], + ] + ], + AtMostN[ + Union[ + BaseSmallStatementMatchType, + OneOf[BaseSmallStatementMatchType], + AllOf[BaseSmallStatementMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.BaseSmallStatement]], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + BaseSmallStatementMatchType, + OneOf[BaseSmallStatementMatchType], + AllOf[BaseSmallStatementMatchType], + AtLeastN[ + Union[ + BaseSmallStatementMatchType, + OneOf[BaseSmallStatementMatchType], + AllOf[BaseSmallStatementMatchType], + ] + ], + AtMostN[ + Union[ + BaseSmallStatementMatchType, + OneOf[BaseSmallStatementMatchType], + AllOf[BaseSmallStatementMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.BaseSmallStatement]], + ] + ], + ] = DoNotCare() + leading_lines: Union[ + Sequence[ + Union[ + EmptyLineMatchType, + DoNotCareSentinel, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + AtLeastN[ + Union[ + EmptyLineMatchType, + DoNotCareSentinel, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + AtMostN[ + Union[ + EmptyLineMatchType, + DoNotCareSentinel, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + ] + ], + DoNotCareSentinel, + MatchIfTrue[Sequence[cst.EmptyLine]], + OneOf[ + Union[ + Sequence[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + AtLeastN[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + AtMostN[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.EmptyLine]], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + AtLeastN[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + AtMostN[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.EmptyLine]], + ] + ], + ] = DoNotCare() + trailing_whitespace: Union[ + TrailingWhitespaceMatchType, + DoNotCareSentinel, + OneOf[TrailingWhitespaceMatchType], + AllOf[TrailingWhitespaceMatchType], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class SimpleStatementSuite(BaseSuite, BaseMatcherNode): + body: Union[ + Sequence[ + Union[ + BaseSmallStatementMatchType, + DoNotCareSentinel, + OneOf[BaseSmallStatementMatchType], + AllOf[BaseSmallStatementMatchType], + AtLeastN[ + Union[ + BaseSmallStatementMatchType, + DoNotCareSentinel, + OneOf[BaseSmallStatementMatchType], + AllOf[BaseSmallStatementMatchType], + ] + ], + AtMostN[ + Union[ + BaseSmallStatementMatchType, + DoNotCareSentinel, + OneOf[BaseSmallStatementMatchType], + AllOf[BaseSmallStatementMatchType], + ] + ], + ] + ], + DoNotCareSentinel, + MatchIfTrue[Sequence[cst.BaseSmallStatement]], + OneOf[ + Union[ + Sequence[ + Union[ + BaseSmallStatementMatchType, + OneOf[BaseSmallStatementMatchType], + AllOf[BaseSmallStatementMatchType], + AtLeastN[ + Union[ + BaseSmallStatementMatchType, + OneOf[BaseSmallStatementMatchType], + AllOf[BaseSmallStatementMatchType], + ] + ], + AtMostN[ + Union[ + BaseSmallStatementMatchType, + OneOf[BaseSmallStatementMatchType], + AllOf[BaseSmallStatementMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.BaseSmallStatement]], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + BaseSmallStatementMatchType, + OneOf[BaseSmallStatementMatchType], + AllOf[BaseSmallStatementMatchType], + AtLeastN[ + Union[ + BaseSmallStatementMatchType, + OneOf[BaseSmallStatementMatchType], + AllOf[BaseSmallStatementMatchType], + ] + ], + AtMostN[ + Union[ + BaseSmallStatementMatchType, + OneOf[BaseSmallStatementMatchType], + AllOf[BaseSmallStatementMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.BaseSmallStatement]], + ] + ], + ] = DoNotCare() + leading_whitespace: Union[ + SimpleWhitespaceMatchType, + DoNotCareSentinel, + OneOf[SimpleWhitespaceMatchType], + AllOf[SimpleWhitespaceMatchType], + ] = DoNotCare() + trailing_whitespace: Union[ + TrailingWhitespaceMatchType, + DoNotCareSentinel, + OneOf[TrailingWhitespaceMatchType], + AllOf[TrailingWhitespaceMatchType], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class SimpleString(BaseExpression, BaseString, BaseMatcherNode): + value: Union[ + strMatchType, DoNotCareSentinel, OneOf[strMatchType], AllOf[strMatchType] + ] = DoNotCare() + lpar: Union[ + Sequence[ + Union[ + LeftParenMatchType, + DoNotCareSentinel, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + AtLeastN[ + Union[ + LeftParenMatchType, + DoNotCareSentinel, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + AtMostN[ + Union[ + LeftParenMatchType, + DoNotCareSentinel, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + ] + ], + DoNotCareSentinel, + MatchIfTrue[Sequence[cst.LeftParen]], + OneOf[ + Union[ + Sequence[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + AtLeastN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + AtMostN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.LeftParen]], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + AtLeastN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + AtMostN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.LeftParen]], + ] + ], + ] = DoNotCare() + rpar: Union[ + Sequence[ + Union[ + RightParenMatchType, + DoNotCareSentinel, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + AtLeastN[ + Union[ + RightParenMatchType, + DoNotCareSentinel, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + AtMostN[ + Union[ + RightParenMatchType, + DoNotCareSentinel, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + ] + ], + DoNotCareSentinel, + MatchIfTrue[Sequence[cst.RightParen]], + OneOf[ + Union[ + Sequence[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + AtLeastN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + AtMostN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.RightParen]], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + AtLeastN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + AtMostN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.RightParen]], + ] + ], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class SimpleWhitespace(BaseParenthesizableWhitespace, BaseMatcherNode): + value: Union[ + strMatchType, DoNotCareSentinel, OneOf[strMatchType], AllOf[strMatchType] + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class Slice(BaseSlice, BaseMatcherNode): + lower: Union[ + Optional["BaseExpression"], + MetadataMatchType, + MatchIfTrue[Optional[cst.BaseExpression]], + DoNotCareSentinel, + OneOf[ + Union[ + Optional["BaseExpression"], + MetadataMatchType, + MatchIfTrue[Optional[cst.BaseExpression]], + ] + ], + AllOf[ + Union[ + Optional["BaseExpression"], + MetadataMatchType, + MatchIfTrue[Optional[cst.BaseExpression]], + ] + ], + ] = DoNotCare() + upper: Union[ + Optional["BaseExpression"], + MetadataMatchType, + MatchIfTrue[Optional[cst.BaseExpression]], + DoNotCareSentinel, + OneOf[ + Union[ + Optional["BaseExpression"], + MetadataMatchType, + MatchIfTrue[Optional[cst.BaseExpression]], + ] + ], + AllOf[ + Union[ + Optional["BaseExpression"], + MetadataMatchType, + MatchIfTrue[Optional[cst.BaseExpression]], + ] + ], + ] = DoNotCare() + step: Union[ + Optional["BaseExpression"], + MetadataMatchType, + MatchIfTrue[Optional[cst.BaseExpression]], + DoNotCareSentinel, + OneOf[ + Union[ + Optional["BaseExpression"], + MetadataMatchType, + MatchIfTrue[Optional[cst.BaseExpression]], + ] + ], + AllOf[ + Union[ + Optional["BaseExpression"], + MetadataMatchType, + MatchIfTrue[Optional[cst.BaseExpression]], + ] + ], + ] = DoNotCare() + first_colon: Union[ + ColonMatchType, DoNotCareSentinel, OneOf[ColonMatchType], AllOf[ColonMatchType] + ] = DoNotCare() + second_colon: Union[ + ColonMatchType, DoNotCareSentinel, OneOf[ColonMatchType], AllOf[ColonMatchType] + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class StarredDictElement(BaseDictElement, BaseMatcherNode): + value: Union[ + BaseExpressionMatchType, + DoNotCareSentinel, + OneOf[BaseExpressionMatchType], + AllOf[BaseExpressionMatchType], + ] = DoNotCare() + comma: Union[ + CommaMatchType, DoNotCareSentinel, OneOf[CommaMatchType], AllOf[CommaMatchType] + ] = DoNotCare() + whitespace_before_value: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class StarredElement(BaseElement, BaseExpression, BaseMatcherNode): + value: Union[ + BaseExpressionMatchType, + DoNotCareSentinel, + OneOf[BaseExpressionMatchType], + AllOf[BaseExpressionMatchType], + ] = DoNotCare() + comma: Union[ + CommaMatchType, DoNotCareSentinel, OneOf[CommaMatchType], AllOf[CommaMatchType] + ] = DoNotCare() + lpar: Union[ + Sequence[ + Union[ + LeftParenMatchType, + DoNotCareSentinel, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + AtLeastN[ + Union[ + LeftParenMatchType, + DoNotCareSentinel, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + AtMostN[ + Union[ + LeftParenMatchType, + DoNotCareSentinel, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + ] + ], + DoNotCareSentinel, + MatchIfTrue[Sequence[cst.LeftParen]], + OneOf[ + Union[ + Sequence[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + AtLeastN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + AtMostN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.LeftParen]], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + AtLeastN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + AtMostN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.LeftParen]], + ] + ], + ] = DoNotCare() + rpar: Union[ + Sequence[ + Union[ + RightParenMatchType, + DoNotCareSentinel, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + AtLeastN[ + Union[ + RightParenMatchType, + DoNotCareSentinel, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + AtMostN[ + Union[ + RightParenMatchType, + DoNotCareSentinel, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + ] + ], + DoNotCareSentinel, + MatchIfTrue[Sequence[cst.RightParen]], + OneOf[ + Union[ + Sequence[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + AtLeastN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + AtMostN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.RightParen]], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + AtLeastN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + AtMostN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.RightParen]], + ] + ], + ] = DoNotCare() + whitespace_before_value: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +SubscriptElementMatchType = Union[ + "SubscriptElement", MetadataMatchType, MatchIfTrue[cst.SubscriptElement] +] + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class Subscript( + BaseAssignTargetExpression, BaseDelTargetExpression, BaseExpression, BaseMatcherNode +): + value: Union[ + BaseExpressionMatchType, + DoNotCareSentinel, + OneOf[BaseExpressionMatchType], + AllOf[BaseExpressionMatchType], + ] = DoNotCare() + slice: Union[ + Sequence[ + Union[ + SubscriptElementMatchType, + DoNotCareSentinel, + OneOf[SubscriptElementMatchType], + AllOf[SubscriptElementMatchType], + AtLeastN[ + Union[ + SubscriptElementMatchType, + DoNotCareSentinel, + OneOf[SubscriptElementMatchType], + AllOf[SubscriptElementMatchType], + ] + ], + AtMostN[ + Union[ + SubscriptElementMatchType, + DoNotCareSentinel, + OneOf[SubscriptElementMatchType], + AllOf[SubscriptElementMatchType], + ] + ], + ] + ], + DoNotCareSentinel, + MatchIfTrue[Sequence[cst.SubscriptElement]], + OneOf[ + Union[ + Sequence[ + Union[ + SubscriptElementMatchType, + OneOf[SubscriptElementMatchType], + AllOf[SubscriptElementMatchType], + AtLeastN[ + Union[ + SubscriptElementMatchType, + OneOf[SubscriptElementMatchType], + AllOf[SubscriptElementMatchType], + ] + ], + AtMostN[ + Union[ + SubscriptElementMatchType, + OneOf[SubscriptElementMatchType], + AllOf[SubscriptElementMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.SubscriptElement]], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + SubscriptElementMatchType, + OneOf[SubscriptElementMatchType], + AllOf[SubscriptElementMatchType], + AtLeastN[ + Union[ + SubscriptElementMatchType, + OneOf[SubscriptElementMatchType], + AllOf[SubscriptElementMatchType], + ] + ], + AtMostN[ + Union[ + SubscriptElementMatchType, + OneOf[SubscriptElementMatchType], + AllOf[SubscriptElementMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.SubscriptElement]], + ] + ], + ] = DoNotCare() + lbracket: Union[ + LeftSquareBracketMatchType, + DoNotCareSentinel, + OneOf[LeftSquareBracketMatchType], + AllOf[LeftSquareBracketMatchType], + ] = DoNotCare() + rbracket: Union[ + RightSquareBracketMatchType, + DoNotCareSentinel, + OneOf[RightSquareBracketMatchType], + AllOf[RightSquareBracketMatchType], + ] = DoNotCare() + lpar: Union[ + Sequence[ + Union[ + LeftParenMatchType, + DoNotCareSentinel, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + AtLeastN[ + Union[ + LeftParenMatchType, + DoNotCareSentinel, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + AtMostN[ + Union[ + LeftParenMatchType, + DoNotCareSentinel, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + ] + ], + DoNotCareSentinel, + MatchIfTrue[Sequence[cst.LeftParen]], + OneOf[ + Union[ + Sequence[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + AtLeastN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + AtMostN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.LeftParen]], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + AtLeastN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + AtMostN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.LeftParen]], + ] + ], + ] = DoNotCare() + rpar: Union[ + Sequence[ + Union[ + RightParenMatchType, + DoNotCareSentinel, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + AtLeastN[ + Union[ + RightParenMatchType, + DoNotCareSentinel, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + AtMostN[ + Union[ + RightParenMatchType, + DoNotCareSentinel, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + ] + ], + DoNotCareSentinel, + MatchIfTrue[Sequence[cst.RightParen]], + OneOf[ + Union[ + Sequence[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + AtLeastN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + AtMostN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.RightParen]], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + AtLeastN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + AtMostN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.RightParen]], + ] + ], + ] = DoNotCare() + whitespace_after_value: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +BaseSliceMatchType = Union["BaseSlice", MetadataMatchType, MatchIfTrue[cst.BaseSlice]] + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class SubscriptElement(BaseMatcherNode): + slice: Union[ + BaseSliceMatchType, + DoNotCareSentinel, + OneOf[BaseSliceMatchType], + AllOf[BaseSliceMatchType], + ] = DoNotCare() + comma: Union[ + CommaMatchType, DoNotCareSentinel, OneOf[CommaMatchType], AllOf[CommaMatchType] + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class Subtract(BaseBinaryOp, BaseMatcherNode): + whitespace_before: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + whitespace_after: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class SubtractAssign(BaseAugOp, BaseMatcherNode): + whitespace_before: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + whitespace_after: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class TrailingWhitespace(BaseMatcherNode): + whitespace: Union[ + SimpleWhitespaceMatchType, + DoNotCareSentinel, + OneOf[SimpleWhitespaceMatchType], + AllOf[SimpleWhitespaceMatchType], + ] = DoNotCare() + comment: Union[ + Optional["Comment"], + MetadataMatchType, + MatchIfTrue[Optional[cst.Comment]], + DoNotCareSentinel, + OneOf[ + Union[ + Optional["Comment"], + MetadataMatchType, + MatchIfTrue[Optional[cst.Comment]], + ] + ], + AllOf[ + Union[ + Optional["Comment"], + MetadataMatchType, + MatchIfTrue[Optional[cst.Comment]], + ] + ], + ] = DoNotCare() + newline: Union[ + NewlineMatchType, + DoNotCareSentinel, + OneOf[NewlineMatchType], + AllOf[NewlineMatchType], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +ExceptHandlerMatchType = Union[ + "ExceptHandler", MetadataMatchType, MatchIfTrue[cst.ExceptHandler] +] + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class Try(BaseCompoundStatement, BaseStatement, BaseMatcherNode): + body: Union[ + BaseSuiteMatchType, + DoNotCareSentinel, + OneOf[BaseSuiteMatchType], + AllOf[BaseSuiteMatchType], + ] = DoNotCare() + handlers: Union[ + Sequence[ + Union[ + ExceptHandlerMatchType, + DoNotCareSentinel, + OneOf[ExceptHandlerMatchType], + AllOf[ExceptHandlerMatchType], + AtLeastN[ + Union[ + ExceptHandlerMatchType, + DoNotCareSentinel, + OneOf[ExceptHandlerMatchType], + AllOf[ExceptHandlerMatchType], + ] + ], + AtMostN[ + Union[ + ExceptHandlerMatchType, + DoNotCareSentinel, + OneOf[ExceptHandlerMatchType], + AllOf[ExceptHandlerMatchType], + ] + ], + ] + ], + DoNotCareSentinel, + MatchIfTrue[Sequence[cst.ExceptHandler]], + OneOf[ + Union[ + Sequence[ + Union[ + ExceptHandlerMatchType, + OneOf[ExceptHandlerMatchType], + AllOf[ExceptHandlerMatchType], + AtLeastN[ + Union[ + ExceptHandlerMatchType, + OneOf[ExceptHandlerMatchType], + AllOf[ExceptHandlerMatchType], + ] + ], + AtMostN[ + Union[ + ExceptHandlerMatchType, + OneOf[ExceptHandlerMatchType], + AllOf[ExceptHandlerMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.ExceptHandler]], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + ExceptHandlerMatchType, + OneOf[ExceptHandlerMatchType], + AllOf[ExceptHandlerMatchType], + AtLeastN[ + Union[ + ExceptHandlerMatchType, + OneOf[ExceptHandlerMatchType], + AllOf[ExceptHandlerMatchType], + ] + ], + AtMostN[ + Union[ + ExceptHandlerMatchType, + OneOf[ExceptHandlerMatchType], + AllOf[ExceptHandlerMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.ExceptHandler]], + ] + ], + ] = DoNotCare() + orelse: Union[ + Optional["Else"], + MetadataMatchType, + MatchIfTrue[Optional[cst.Else]], + DoNotCareSentinel, + OneOf[ + Union[Optional["Else"], MetadataMatchType, MatchIfTrue[Optional[cst.Else]]] + ], + AllOf[ + Union[Optional["Else"], MetadataMatchType, MatchIfTrue[Optional[cst.Else]]] + ], + ] = DoNotCare() + finalbody: Union[ + Optional["Finally"], + MetadataMatchType, + MatchIfTrue[Optional[cst.Finally]], + DoNotCareSentinel, + OneOf[ + Union[ + Optional["Finally"], + MetadataMatchType, + MatchIfTrue[Optional[cst.Finally]], + ] + ], + AllOf[ + Union[ + Optional["Finally"], + MetadataMatchType, + MatchIfTrue[Optional[cst.Finally]], + ] + ], + ] = DoNotCare() + leading_lines: Union[ + Sequence[ + Union[ + EmptyLineMatchType, + DoNotCareSentinel, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + AtLeastN[ + Union[ + EmptyLineMatchType, + DoNotCareSentinel, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + AtMostN[ + Union[ + EmptyLineMatchType, + DoNotCareSentinel, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + ] + ], + DoNotCareSentinel, + MatchIfTrue[Sequence[cst.EmptyLine]], + OneOf[ + Union[ + Sequence[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + AtLeastN[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + AtMostN[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.EmptyLine]], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + AtLeastN[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + AtMostN[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.EmptyLine]], + ] + ], + ] = DoNotCare() + whitespace_before_colon: Union[ + SimpleWhitespaceMatchType, + DoNotCareSentinel, + OneOf[SimpleWhitespaceMatchType], + AllOf[SimpleWhitespaceMatchType], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +ExceptStarHandlerMatchType = Union[ + "ExceptStarHandler", MetadataMatchType, MatchIfTrue[cst.ExceptStarHandler] +] + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class TryStar(BaseCompoundStatement, BaseStatement, BaseMatcherNode): + body: Union[ + BaseSuiteMatchType, + DoNotCareSentinel, + OneOf[BaseSuiteMatchType], + AllOf[BaseSuiteMatchType], + ] = DoNotCare() + handlers: Union[ + Sequence[ + Union[ + ExceptStarHandlerMatchType, + DoNotCareSentinel, + OneOf[ExceptStarHandlerMatchType], + AllOf[ExceptStarHandlerMatchType], + AtLeastN[ + Union[ + ExceptStarHandlerMatchType, + DoNotCareSentinel, + OneOf[ExceptStarHandlerMatchType], + AllOf[ExceptStarHandlerMatchType], + ] + ], + AtMostN[ + Union[ + ExceptStarHandlerMatchType, + DoNotCareSentinel, + OneOf[ExceptStarHandlerMatchType], + AllOf[ExceptStarHandlerMatchType], + ] + ], + ] + ], + DoNotCareSentinel, + MatchIfTrue[Sequence[cst.ExceptStarHandler]], + OneOf[ + Union[ + Sequence[ + Union[ + ExceptStarHandlerMatchType, + OneOf[ExceptStarHandlerMatchType], + AllOf[ExceptStarHandlerMatchType], + AtLeastN[ + Union[ + ExceptStarHandlerMatchType, + OneOf[ExceptStarHandlerMatchType], + AllOf[ExceptStarHandlerMatchType], + ] + ], + AtMostN[ + Union[ + ExceptStarHandlerMatchType, + OneOf[ExceptStarHandlerMatchType], + AllOf[ExceptStarHandlerMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.ExceptStarHandler]], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + ExceptStarHandlerMatchType, + OneOf[ExceptStarHandlerMatchType], + AllOf[ExceptStarHandlerMatchType], + AtLeastN[ + Union[ + ExceptStarHandlerMatchType, + OneOf[ExceptStarHandlerMatchType], + AllOf[ExceptStarHandlerMatchType], + ] + ], + AtMostN[ + Union[ + ExceptStarHandlerMatchType, + OneOf[ExceptStarHandlerMatchType], + AllOf[ExceptStarHandlerMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.ExceptStarHandler]], + ] + ], + ] = DoNotCare() + orelse: Union[ + Optional["Else"], + MetadataMatchType, + MatchIfTrue[Optional[cst.Else]], + DoNotCareSentinel, + OneOf[ + Union[Optional["Else"], MetadataMatchType, MatchIfTrue[Optional[cst.Else]]] + ], + AllOf[ + Union[Optional["Else"], MetadataMatchType, MatchIfTrue[Optional[cst.Else]]] + ], + ] = DoNotCare() + finalbody: Union[ + Optional["Finally"], + MetadataMatchType, + MatchIfTrue[Optional[cst.Finally]], + DoNotCareSentinel, + OneOf[ + Union[ + Optional["Finally"], + MetadataMatchType, + MatchIfTrue[Optional[cst.Finally]], + ] + ], + AllOf[ + Union[ + Optional["Finally"], + MetadataMatchType, + MatchIfTrue[Optional[cst.Finally]], + ] + ], + ] = DoNotCare() + leading_lines: Union[ + Sequence[ + Union[ + EmptyLineMatchType, + DoNotCareSentinel, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + AtLeastN[ + Union[ + EmptyLineMatchType, + DoNotCareSentinel, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + AtMostN[ + Union[ + EmptyLineMatchType, + DoNotCareSentinel, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + ] + ], + DoNotCareSentinel, + MatchIfTrue[Sequence[cst.EmptyLine]], + OneOf[ + Union[ + Sequence[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + AtLeastN[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + AtMostN[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.EmptyLine]], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + AtLeastN[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + AtMostN[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.EmptyLine]], + ] + ], + ] = DoNotCare() + whitespace_before_colon: Union[ + SimpleWhitespaceMatchType, + DoNotCareSentinel, + OneOf[SimpleWhitespaceMatchType], + AllOf[SimpleWhitespaceMatchType], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class Tuple( + BaseAssignTargetExpression, BaseDelTargetExpression, BaseExpression, BaseMatcherNode +): + elements: Union[ + Sequence[ + Union[ + BaseElementMatchType, + DoNotCareSentinel, + OneOf[BaseElementMatchType], + AllOf[BaseElementMatchType], + AtLeastN[ + Union[ + BaseElementMatchType, + DoNotCareSentinel, + OneOf[BaseElementMatchType], + AllOf[BaseElementMatchType], + ] + ], + AtMostN[ + Union[ + BaseElementMatchType, + DoNotCareSentinel, + OneOf[BaseElementMatchType], + AllOf[BaseElementMatchType], + ] + ], + ] + ], + DoNotCareSentinel, + MatchIfTrue[Sequence[cst.BaseElement]], + OneOf[ + Union[ + Sequence[ + Union[ + BaseElementMatchType, + OneOf[BaseElementMatchType], + AllOf[BaseElementMatchType], + AtLeastN[ + Union[ + BaseElementMatchType, + OneOf[BaseElementMatchType], + AllOf[BaseElementMatchType], + ] + ], + AtMostN[ + Union[ + BaseElementMatchType, + OneOf[BaseElementMatchType], + AllOf[BaseElementMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.BaseElement]], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + BaseElementMatchType, + OneOf[BaseElementMatchType], + AllOf[BaseElementMatchType], + AtLeastN[ + Union[ + BaseElementMatchType, + OneOf[BaseElementMatchType], + AllOf[BaseElementMatchType], + ] + ], + AtMostN[ + Union[ + BaseElementMatchType, + OneOf[BaseElementMatchType], + AllOf[BaseElementMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.BaseElement]], + ] + ], + ] = DoNotCare() + lpar: Union[ + Sequence[ + Union[ + LeftParenMatchType, + DoNotCareSentinel, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + AtLeastN[ + Union[ + LeftParenMatchType, + DoNotCareSentinel, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + AtMostN[ + Union[ + LeftParenMatchType, + DoNotCareSentinel, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + ] + ], + DoNotCareSentinel, + MatchIfTrue[Sequence[cst.LeftParen]], + OneOf[ + Union[ + Sequence[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + AtLeastN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + AtMostN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.LeftParen]], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + AtLeastN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + AtMostN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.LeftParen]], + ] + ], + ] = DoNotCare() + rpar: Union[ + Sequence[ + Union[ + RightParenMatchType, + DoNotCareSentinel, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + AtLeastN[ + Union[ + RightParenMatchType, + DoNotCareSentinel, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + AtMostN[ + Union[ + RightParenMatchType, + DoNotCareSentinel, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + ] + ], + DoNotCareSentinel, + MatchIfTrue[Sequence[cst.RightParen]], + OneOf[ + Union[ + Sequence[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + AtLeastN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + AtMostN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.RightParen]], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + AtLeastN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + AtMostN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.RightParen]], + ] + ], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class TypeAlias(BaseSmallStatement, BaseMatcherNode): + name: Union[ + NameMatchType, DoNotCareSentinel, OneOf[NameMatchType], AllOf[NameMatchType] + ] = DoNotCare() + value: Union[ + BaseExpressionMatchType, + DoNotCareSentinel, + OneOf[BaseExpressionMatchType], + AllOf[BaseExpressionMatchType], + ] = DoNotCare() + type_parameters: Union[ + Optional["TypeParameters"], + MetadataMatchType, + MatchIfTrue[Optional[cst.TypeParameters]], + DoNotCareSentinel, + OneOf[ + Union[ + Optional["TypeParameters"], + MetadataMatchType, + MatchIfTrue[Optional[cst.TypeParameters]], + ] + ], + AllOf[ + Union[ + Optional["TypeParameters"], + MetadataMatchType, + MatchIfTrue[Optional[cst.TypeParameters]], + ] + ], + ] = DoNotCare() + whitespace_after_type: Union[ + SimpleWhitespaceMatchType, + DoNotCareSentinel, + OneOf[SimpleWhitespaceMatchType], + AllOf[SimpleWhitespaceMatchType], + ] = DoNotCare() + whitespace_after_name: Union[ + SimpleWhitespaceMatchType, + DoNotCareSentinel, + OneOf[SimpleWhitespaceMatchType], + AllOf[SimpleWhitespaceMatchType], + ] = DoNotCare() + whitespace_after_type_parameters: Union[ + SimpleWhitespaceMatchType, + DoNotCareSentinel, + OneOf[SimpleWhitespaceMatchType], + AllOf[SimpleWhitespaceMatchType], + ] = DoNotCare() + whitespace_after_equals: Union[ + SimpleWhitespaceMatchType, + DoNotCareSentinel, + OneOf[SimpleWhitespaceMatchType], + AllOf[SimpleWhitespaceMatchType], + ] = DoNotCare() + semicolon: Union[ + SemicolonMatchType, + DoNotCareSentinel, + OneOf[SemicolonMatchType], + AllOf[SemicolonMatchType], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +TypeVarOrTypeVarTupleOrParamSpecMatchType = Union[ + "TypeVar", + "TypeVarTuple", + "ParamSpec", + MetadataMatchType, + MatchIfTrue[Union[cst.TypeVar, cst.TypeVarTuple, cst.ParamSpec]], +] + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class TypeParam(BaseMatcherNode): + param: Union[ + TypeVarOrTypeVarTupleOrParamSpecMatchType, + DoNotCareSentinel, + OneOf[TypeVarOrTypeVarTupleOrParamSpecMatchType], + AllOf[TypeVarOrTypeVarTupleOrParamSpecMatchType], + ] = DoNotCare() + comma: Union[ + CommaMatchType, DoNotCareSentinel, OneOf[CommaMatchType], AllOf[CommaMatchType] + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +TypeParamMatchType = Union["TypeParam", MetadataMatchType, MatchIfTrue[cst.TypeParam]] + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class TypeParameters(BaseMatcherNode): + params: Union[ + Sequence[ + Union[ + TypeParamMatchType, + DoNotCareSentinel, + OneOf[TypeParamMatchType], + AllOf[TypeParamMatchType], + AtLeastN[ + Union[ + TypeParamMatchType, + DoNotCareSentinel, + OneOf[TypeParamMatchType], + AllOf[TypeParamMatchType], + ] + ], + AtMostN[ + Union[ + TypeParamMatchType, + DoNotCareSentinel, + OneOf[TypeParamMatchType], + AllOf[TypeParamMatchType], + ] + ], + ] + ], + DoNotCareSentinel, + MatchIfTrue[Sequence[cst.TypeParam]], + OneOf[ + Union[ + Sequence[ + Union[ + TypeParamMatchType, + OneOf[TypeParamMatchType], + AllOf[TypeParamMatchType], + AtLeastN[ + Union[ + TypeParamMatchType, + OneOf[TypeParamMatchType], + AllOf[TypeParamMatchType], + ] + ], + AtMostN[ + Union[ + TypeParamMatchType, + OneOf[TypeParamMatchType], + AllOf[TypeParamMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.TypeParam]], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + TypeParamMatchType, + OneOf[TypeParamMatchType], + AllOf[TypeParamMatchType], + AtLeastN[ + Union[ + TypeParamMatchType, + OneOf[TypeParamMatchType], + AllOf[TypeParamMatchType], + ] + ], + AtMostN[ + Union[ + TypeParamMatchType, + OneOf[TypeParamMatchType], + AllOf[TypeParamMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.TypeParam]], + ] + ], + ] = DoNotCare() + lbracket: Union[ + LeftSquareBracketMatchType, + DoNotCareSentinel, + OneOf[LeftSquareBracketMatchType], + AllOf[LeftSquareBracketMatchType], + ] = DoNotCare() + rbracket: Union[ + RightSquareBracketMatchType, + DoNotCareSentinel, + OneOf[RightSquareBracketMatchType], + AllOf[RightSquareBracketMatchType], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class TypeVar(BaseMatcherNode): + name: Union[ + NameMatchType, DoNotCareSentinel, OneOf[NameMatchType], AllOf[NameMatchType] + ] = DoNotCare() + bound: Union[ + Optional["BaseExpression"], + MetadataMatchType, + MatchIfTrue[Optional[cst.BaseExpression]], + DoNotCareSentinel, + OneOf[ + Union[ + Optional["BaseExpression"], + MetadataMatchType, + MatchIfTrue[Optional[cst.BaseExpression]], + ] + ], + AllOf[ + Union[ + Optional["BaseExpression"], + MetadataMatchType, + MatchIfTrue[Optional[cst.BaseExpression]], + ] + ], + ] = DoNotCare() + colon: Union[ + ColonMatchType, DoNotCareSentinel, OneOf[ColonMatchType], AllOf[ColonMatchType] + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class TypeVarTuple(BaseMatcherNode): + name: Union[ + NameMatchType, DoNotCareSentinel, OneOf[NameMatchType], AllOf[NameMatchType] + ] = DoNotCare() + whitespace_after_star: Union[ + SimpleWhitespaceMatchType, + DoNotCareSentinel, + OneOf[SimpleWhitespaceMatchType], + AllOf[SimpleWhitespaceMatchType], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +BaseUnaryOpMatchType = Union[ + "BaseUnaryOp", MetadataMatchType, MatchIfTrue[cst.BaseUnaryOp] +] + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class UnaryOperation(BaseExpression, BaseMatcherNode): + operator: Union[ + BaseUnaryOpMatchType, + DoNotCareSentinel, + OneOf[BaseUnaryOpMatchType], + AllOf[BaseUnaryOpMatchType], + ] = DoNotCare() + expression: Union[ + BaseExpressionMatchType, + DoNotCareSentinel, + OneOf[BaseExpressionMatchType], + AllOf[BaseExpressionMatchType], + ] = DoNotCare() + lpar: Union[ + Sequence[ + Union[ + LeftParenMatchType, + DoNotCareSentinel, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + AtLeastN[ + Union[ + LeftParenMatchType, + DoNotCareSentinel, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + AtMostN[ + Union[ + LeftParenMatchType, + DoNotCareSentinel, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + ] + ], + DoNotCareSentinel, + MatchIfTrue[Sequence[cst.LeftParen]], + OneOf[ + Union[ + Sequence[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + AtLeastN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + AtMostN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.LeftParen]], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + AtLeastN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + AtMostN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.LeftParen]], + ] + ], + ] = DoNotCare() + rpar: Union[ + Sequence[ + Union[ + RightParenMatchType, + DoNotCareSentinel, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + AtLeastN[ + Union[ + RightParenMatchType, + DoNotCareSentinel, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + AtMostN[ + Union[ + RightParenMatchType, + DoNotCareSentinel, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + ] + ], + DoNotCareSentinel, + MatchIfTrue[Sequence[cst.RightParen]], + OneOf[ + Union[ + Sequence[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + AtLeastN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + AtMostN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.RightParen]], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + AtLeastN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + AtMostN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.RightParen]], + ] + ], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class While(BaseCompoundStatement, BaseStatement, BaseMatcherNode): + test: Union[ + BaseExpressionMatchType, + DoNotCareSentinel, + OneOf[BaseExpressionMatchType], + AllOf[BaseExpressionMatchType], + ] = DoNotCare() + body: Union[ + BaseSuiteMatchType, + DoNotCareSentinel, + OneOf[BaseSuiteMatchType], + AllOf[BaseSuiteMatchType], + ] = DoNotCare() + orelse: Union[ + Optional["Else"], + MetadataMatchType, + MatchIfTrue[Optional[cst.Else]], + DoNotCareSentinel, + OneOf[ + Union[Optional["Else"], MetadataMatchType, MatchIfTrue[Optional[cst.Else]]] + ], + AllOf[ + Union[Optional["Else"], MetadataMatchType, MatchIfTrue[Optional[cst.Else]]] + ], + ] = DoNotCare() + leading_lines: Union[ + Sequence[ + Union[ + EmptyLineMatchType, + DoNotCareSentinel, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + AtLeastN[ + Union[ + EmptyLineMatchType, + DoNotCareSentinel, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + AtMostN[ + Union[ + EmptyLineMatchType, + DoNotCareSentinel, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + ] + ], + DoNotCareSentinel, + MatchIfTrue[Sequence[cst.EmptyLine]], + OneOf[ + Union[ + Sequence[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + AtLeastN[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + AtMostN[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.EmptyLine]], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + AtLeastN[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + AtMostN[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.EmptyLine]], + ] + ], + ] = DoNotCare() + whitespace_after_while: Union[ + SimpleWhitespaceMatchType, + DoNotCareSentinel, + OneOf[SimpleWhitespaceMatchType], + AllOf[SimpleWhitespaceMatchType], + ] = DoNotCare() + whitespace_before_colon: Union[ + SimpleWhitespaceMatchType, + DoNotCareSentinel, + OneOf[SimpleWhitespaceMatchType], + AllOf[SimpleWhitespaceMatchType], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +WithItemMatchType = Union["WithItem", MetadataMatchType, MatchIfTrue[cst.WithItem]] + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class With(BaseCompoundStatement, BaseStatement, BaseMatcherNode): + items: Union[ + Sequence[ + Union[ + WithItemMatchType, + DoNotCareSentinel, + OneOf[WithItemMatchType], + AllOf[WithItemMatchType], + AtLeastN[ + Union[ + WithItemMatchType, + DoNotCareSentinel, + OneOf[WithItemMatchType], + AllOf[WithItemMatchType], + ] + ], + AtMostN[ + Union[ + WithItemMatchType, + DoNotCareSentinel, + OneOf[WithItemMatchType], + AllOf[WithItemMatchType], + ] + ], + ] + ], + DoNotCareSentinel, + MatchIfTrue[Sequence[cst.WithItem]], + OneOf[ + Union[ + Sequence[ + Union[ + WithItemMatchType, + OneOf[WithItemMatchType], + AllOf[WithItemMatchType], + AtLeastN[ + Union[ + WithItemMatchType, + OneOf[WithItemMatchType], + AllOf[WithItemMatchType], + ] + ], + AtMostN[ + Union[ + WithItemMatchType, + OneOf[WithItemMatchType], + AllOf[WithItemMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.WithItem]], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + WithItemMatchType, + OneOf[WithItemMatchType], + AllOf[WithItemMatchType], + AtLeastN[ + Union[ + WithItemMatchType, + OneOf[WithItemMatchType], + AllOf[WithItemMatchType], + ] + ], + AtMostN[ + Union[ + WithItemMatchType, + OneOf[WithItemMatchType], + AllOf[WithItemMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.WithItem]], + ] + ], + ] = DoNotCare() + body: Union[ + BaseSuiteMatchType, + DoNotCareSentinel, + OneOf[BaseSuiteMatchType], + AllOf[BaseSuiteMatchType], + ] = DoNotCare() + asynchronous: Union[ + Optional["Asynchronous"], + MetadataMatchType, + MatchIfTrue[Optional[cst.Asynchronous]], + DoNotCareSentinel, + OneOf[ + Union[ + Optional["Asynchronous"], + MetadataMatchType, + MatchIfTrue[Optional[cst.Asynchronous]], + ] + ], + AllOf[ + Union[ + Optional["Asynchronous"], + MetadataMatchType, + MatchIfTrue[Optional[cst.Asynchronous]], + ] + ], + ] = DoNotCare() + leading_lines: Union[ + Sequence[ + Union[ + EmptyLineMatchType, + DoNotCareSentinel, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + AtLeastN[ + Union[ + EmptyLineMatchType, + DoNotCareSentinel, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + AtMostN[ + Union[ + EmptyLineMatchType, + DoNotCareSentinel, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + ] + ], + DoNotCareSentinel, + MatchIfTrue[Sequence[cst.EmptyLine]], + OneOf[ + Union[ + Sequence[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + AtLeastN[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + AtMostN[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.EmptyLine]], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + AtLeastN[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + AtMostN[ + Union[ + EmptyLineMatchType, + OneOf[EmptyLineMatchType], + AllOf[EmptyLineMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.EmptyLine]], + ] + ], + ] = DoNotCare() + lpar: Union[ + LeftParenMatchType, + DoNotCareSentinel, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] = DoNotCare() + rpar: Union[ + RightParenMatchType, + DoNotCareSentinel, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] = DoNotCare() + whitespace_after_with: Union[ + SimpleWhitespaceMatchType, + DoNotCareSentinel, + OneOf[SimpleWhitespaceMatchType], + AllOf[SimpleWhitespaceMatchType], + ] = DoNotCare() + whitespace_before_colon: Union[ + SimpleWhitespaceMatchType, + DoNotCareSentinel, + OneOf[SimpleWhitespaceMatchType], + AllOf[SimpleWhitespaceMatchType], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class WithItem(BaseMatcherNode): + item: Union[ + BaseExpressionMatchType, + DoNotCareSentinel, + OneOf[BaseExpressionMatchType], + AllOf[BaseExpressionMatchType], + ] = DoNotCare() + asname: Union[ + Optional["AsName"], + MetadataMatchType, + MatchIfTrue[Optional[cst.AsName]], + DoNotCareSentinel, + OneOf[ + Union[ + Optional["AsName"], MetadataMatchType, MatchIfTrue[Optional[cst.AsName]] + ] + ], + AllOf[ + Union[ + Optional["AsName"], MetadataMatchType, MatchIfTrue[Optional[cst.AsName]] + ] + ], + ] = DoNotCare() + comma: Union[ + CommaMatchType, DoNotCareSentinel, OneOf[CommaMatchType], AllOf[CommaMatchType] + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +BaseExpressionOrFromOrNoneMatchType = Union[ + "BaseExpression", + "From", + None, + MetadataMatchType, + MatchIfTrue[Union[cst.BaseExpression, cst.From, None]], +] + + +@dataclass(frozen=True, eq=False, unsafe_hash=False) +class Yield(BaseExpression, BaseMatcherNode): + value: Union[ + BaseExpressionOrFromOrNoneMatchType, + DoNotCareSentinel, + OneOf[BaseExpressionOrFromOrNoneMatchType], + AllOf[BaseExpressionOrFromOrNoneMatchType], + ] = DoNotCare() + lpar: Union[ + Sequence[ + Union[ + LeftParenMatchType, + DoNotCareSentinel, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + AtLeastN[ + Union[ + LeftParenMatchType, + DoNotCareSentinel, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + AtMostN[ + Union[ + LeftParenMatchType, + DoNotCareSentinel, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + ] + ], + DoNotCareSentinel, + MatchIfTrue[Sequence[cst.LeftParen]], + OneOf[ + Union[ + Sequence[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + AtLeastN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + AtMostN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.LeftParen]], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + AtLeastN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + AtMostN[ + Union[ + LeftParenMatchType, + OneOf[LeftParenMatchType], + AllOf[LeftParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.LeftParen]], + ] + ], + ] = DoNotCare() + rpar: Union[ + Sequence[ + Union[ + RightParenMatchType, + DoNotCareSentinel, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + AtLeastN[ + Union[ + RightParenMatchType, + DoNotCareSentinel, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + AtMostN[ + Union[ + RightParenMatchType, + DoNotCareSentinel, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + ] + ], + DoNotCareSentinel, + MatchIfTrue[Sequence[cst.RightParen]], + OneOf[ + Union[ + Sequence[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + AtLeastN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + AtMostN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.RightParen]], + ] + ], + AllOf[ + Union[ + Sequence[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + AtLeastN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + AtMostN[ + Union[ + RightParenMatchType, + OneOf[RightParenMatchType], + AllOf[RightParenMatchType], + ] + ], + ] + ], + MatchIfTrue[Sequence[cst.RightParen]], + ] + ], + ] = DoNotCare() + whitespace_after_yield: Union[ + BaseParenthesizableWhitespaceMatchType, + DoNotCareSentinel, + OneOf[BaseParenthesizableWhitespaceMatchType], + AllOf[BaseParenthesizableWhitespaceMatchType], + ] = DoNotCare() + metadata: Union[ + MetadataMatchType, + DoNotCareSentinel, + OneOf[MetadataMatchType], + AllOf[MetadataMatchType], + ] = DoNotCare() + + +__all__ = [ + "Add", + "AddAssign", + "AllOf", + "And", + "AnnAssign", + "Annotation", + "Arg", + "AsName", + "Assert", + "Assign", + "AssignEqual", + "AssignTarget", + "Asynchronous", + "AtLeastN", + "AtMostN", + "Attribute", + "AugAssign", + "Await", + "BaseAssignTargetExpression", + "BaseAugOp", + "BaseBinaryOp", + "BaseBooleanOp", + "BaseComp", + "BaseCompOp", + "BaseCompoundStatement", + "BaseDelTargetExpression", + "BaseDict", + "BaseDictElement", + "BaseElement", + "BaseExpression", + "BaseFormattedStringContent", + "BaseList", + "BaseMatcherNode", + "BaseMetadataProvider", + "BaseNumber", + "BaseParenthesizableWhitespace", + "BaseSet", + "BaseSimpleComp", + "BaseSlice", + "BaseSmallStatement", + "BaseStatement", + "BaseString", + "BaseSuite", + "BaseUnaryOp", + "BinaryOperation", + "BitAnd", + "BitAndAssign", + "BitInvert", + "BitOr", + "BitOrAssign", + "BitXor", + "BitXorAssign", + "BooleanOperation", + "Break", + "Call", + "ClassDef", + "Colon", + "Comma", + "Comment", + "CompFor", + "CompIf", + "Comparison", + "ComparisonTarget", + "ConcatenatedString", + "Continue", + "Decorator", + "Del", + "Dict", + "DictComp", + "DictElement", + "Divide", + "DivideAssign", + "DoNotCare", + "DoNotCareSentinel", + "DoesNotMatch", + "Dot", + "Element", + "Ellipsis", + "Else", + "EmptyLine", + "Equal", + "ExceptHandler", + "ExceptStarHandler", + "Expr", + "Finally", + "Float", + "FloorDivide", + "FloorDivideAssign", + "For", + "FormattedString", + "FormattedStringExpression", + "FormattedStringText", + "From", + "FunctionDef", + "GeneratorExp", + "Global", + "GreaterThan", + "GreaterThanEqual", + "If", + "IfExp", + "Imaginary", + "Import", + "ImportAlias", + "ImportFrom", + "ImportStar", + "In", + "IndentedBlock", + "Index", + "Integer", + "Is", + "IsNot", + "Lambda", + "LeftCurlyBrace", + "LeftParen", + "LeftShift", + "LeftShiftAssign", + "LeftSquareBracket", + "LessThan", + "LessThanEqual", + "List", + "ListComp", + "Match", + "MatchAs", + "MatchCase", + "MatchClass", + "MatchDecoratorMismatch", + "MatchIfTrue", + "MatchKeywordElement", + "MatchList", + "MatchMapping", + "MatchMappingElement", + "MatchMetadata", + "MatchMetadataIfTrue", + "MatchOr", + "MatchOrElement", + "MatchPattern", + "MatchRegex", + "MatchSequence", + "MatchSequenceElement", + "MatchSingleton", + "MatchStar", + "MatchTuple", + "MatchValue", + "MatcherDecoratableTransformer", + "MatcherDecoratableVisitor", + "MatrixMultiply", + "MatrixMultiplyAssign", + "Minus", + "Module", + "Modulo", + "ModuloAssign", + "Multiply", + "MultiplyAssign", + "Name", + "NameItem", + "NamedExpr", + "Newline", + "Nonlocal", + "Not", + "NotEqual", + "NotIn", + "OneOf", + "Or", + "Param", + "ParamSlash", + "ParamSpec", + "ParamStar", + "Parameters", + "ParenthesizedWhitespace", + "Pass", + "Plus", + "Power", + "PowerAssign", + "Raise", + "Return", + "RightCurlyBrace", + "RightParen", + "RightShift", + "RightShiftAssign", + "RightSquareBracket", + "SaveMatchedNode", + "Semicolon", + "Set", + "SetComp", + "SimpleStatementLine", + "SimpleStatementSuite", + "SimpleString", + "SimpleWhitespace", + "Slice", + "StarredDictElement", + "StarredElement", + "Subscript", + "SubscriptElement", + "Subtract", + "SubtractAssign", + "TrailingWhitespace", + "Try", + "TryStar", + "Tuple", + "TypeAlias", + "TypeOf", + "TypeParam", + "TypeParameters", + "TypeVar", + "TypeVarTuple", + "UnaryOperation", + "While", + "With", + "WithItem", + "Yield", + "ZeroOrMore", + "ZeroOrOne", + "call_if_inside", + "call_if_not_inside", + "extract", + "extractall", + "findall", + "leave", + "matches", + "replace", + "visit", +] diff --git a/libcst/matchers/_return_types.py b/libcst/matchers/_return_types.py index e28e58006..7534a957d 100644 --- a/libcst/matchers/_return_types.py +++ b/libcst/matchers/_return_types.py @@ -1,373 +1,373 @@ -# Copyright (c) Meta Platforms, Inc. and affiliates. -# -# This source code is licensed under the MIT license found in the -# LICENSE file in the root directory of this source tree. - - -# This file was generated by libcst.codegen.gen_type_mapping -from typing import Dict as TypingDict, Type, Union - -from libcst._maybe_sentinel import MaybeSentinel -from libcst._nodes.base import CSTNode -from libcst._nodes.expression import ( - Annotation, - Arg, - Asynchronous, - Attribute, - Await, - BaseDictElement, - BaseElement, - BaseExpression, - BaseFormattedStringContent, - BaseSlice, - BinaryOperation, - BooleanOperation, - Call, - Comparison, - ComparisonTarget, - CompFor, - CompIf, - ConcatenatedString, - Dict, - DictComp, - DictElement, - Element, - Ellipsis, - Float, - FormattedString, - FormattedStringExpression, - FormattedStringText, - From, - GeneratorExp, - IfExp, - Imaginary, - Index, - Integer, - Lambda, - LeftCurlyBrace, - LeftParen, - LeftSquareBracket, - List, - ListComp, - Name, - NamedExpr, - Param, - Parameters, - ParamSlash, - ParamStar, - RightCurlyBrace, - RightParen, - RightSquareBracket, - Set, - SetComp, - SimpleString, - Slice, - StarredDictElement, - StarredElement, - Subscript, - SubscriptElement, - Tuple, - UnaryOperation, - Yield, -) -from libcst._nodes.module import Module -from libcst._nodes.op import ( - Add, - AddAssign, - And, - AssignEqual, - BaseAugOp, - BaseBinaryOp, - BaseBooleanOp, - BaseCompOp, - BaseUnaryOp, - BitAnd, - BitAndAssign, - BitInvert, - BitOr, - BitOrAssign, - BitXor, - BitXorAssign, - Colon, - Comma, - Divide, - DivideAssign, - Dot, - Equal, - FloorDivide, - FloorDivideAssign, - GreaterThan, - GreaterThanEqual, - ImportStar, - In, - Is, - IsNot, - LeftShift, - LeftShiftAssign, - LessThan, - LessThanEqual, - MatrixMultiply, - MatrixMultiplyAssign, - Minus, - Modulo, - ModuloAssign, - Multiply, - MultiplyAssign, - Not, - NotEqual, - NotIn, - Or, - Plus, - Power, - PowerAssign, - RightShift, - RightShiftAssign, - Semicolon, - Subtract, - SubtractAssign, -) -from libcst._nodes.statement import ( - AnnAssign, - AsName, - Assert, - Assign, - AssignTarget, - AugAssign, - BaseSmallStatement, - BaseStatement, - BaseSuite, - Break, - ClassDef, - Continue, - Decorator, - Del, - Else, - ExceptHandler, - ExceptStarHandler, - Expr, - Finally, - For, - FunctionDef, - Global, - If, - Import, - ImportAlias, - ImportFrom, - IndentedBlock, - Match, - MatchAs, - MatchCase, - MatchClass, - MatchKeywordElement, - MatchList, - MatchMapping, - MatchMappingElement, - MatchOr, - MatchOrElement, - MatchPattern, - MatchSequence, - MatchSequenceElement, - MatchSingleton, - MatchStar, - MatchTuple, - MatchValue, - NameItem, - Nonlocal, - ParamSpec, - Pass, - Raise, - Return, - SimpleStatementLine, - SimpleStatementSuite, - Try, - TryStar, - TypeAlias, - TypeParam, - TypeParameters, - TypeVar, - TypeVarTuple, - While, - With, - WithItem, -) -from libcst._nodes.whitespace import ( - BaseParenthesizableWhitespace, - Comment, - EmptyLine, - Newline, - ParenthesizedWhitespace, - SimpleWhitespace, - TrailingWhitespace, -) -from libcst._removal_sentinel import RemovalSentinel - -TYPED_FUNCTION_RETURN_MAPPING: TypingDict[Type[CSTNode], object] = { - Add: BaseBinaryOp, - AddAssign: BaseAugOp, - And: BaseBooleanOp, - AnnAssign: Union[BaseSmallStatement, RemovalSentinel], - Annotation: Annotation, - Arg: Union[Arg, RemovalSentinel], - AsName: AsName, - Assert: Union[BaseSmallStatement, RemovalSentinel], - Assign: Union[BaseSmallStatement, RemovalSentinel], - AssignEqual: Union[AssignEqual, MaybeSentinel], - AssignTarget: Union[AssignTarget, RemovalSentinel], - Asynchronous: Asynchronous, - Attribute: BaseExpression, - AugAssign: Union[BaseSmallStatement, RemovalSentinel], - Await: BaseExpression, - BinaryOperation: BaseExpression, - BitAnd: BaseBinaryOp, - BitAndAssign: BaseAugOp, - BitInvert: BaseUnaryOp, - BitOr: Union[BaseBinaryOp, MaybeSentinel], - BitOrAssign: BaseAugOp, - BitXor: BaseBinaryOp, - BitXorAssign: BaseAugOp, - BooleanOperation: BaseExpression, - Break: Union[BaseSmallStatement, RemovalSentinel], - Call: BaseExpression, - ClassDef: Union[BaseStatement, RemovalSentinel], - Colon: Union[Colon, MaybeSentinel], - Comma: Union[Comma, MaybeSentinel], - Comment: Comment, - CompFor: CompFor, - CompIf: CompIf, - Comparison: BaseExpression, - ComparisonTarget: Union[ComparisonTarget, RemovalSentinel], - ConcatenatedString: BaseExpression, - Continue: Union[BaseSmallStatement, RemovalSentinel], - Decorator: Union[Decorator, RemovalSentinel], - Del: Union[BaseSmallStatement, RemovalSentinel], - Dict: BaseExpression, - DictComp: BaseExpression, - DictElement: Union[BaseDictElement, RemovalSentinel], - Divide: BaseBinaryOp, - DivideAssign: BaseAugOp, - Dot: Union[Dot, RemovalSentinel], - Element: Union[BaseElement, RemovalSentinel], - Ellipsis: BaseExpression, - Else: Else, - EmptyLine: Union[EmptyLine, RemovalSentinel], - Equal: BaseCompOp, - ExceptHandler: Union[ExceptHandler, RemovalSentinel], - ExceptStarHandler: Union[ExceptStarHandler, RemovalSentinel], - Expr: Union[BaseSmallStatement, RemovalSentinel], - Finally: Finally, - Float: BaseExpression, - FloorDivide: BaseBinaryOp, - FloorDivideAssign: BaseAugOp, - For: Union[BaseStatement, RemovalSentinel], - FormattedString: BaseExpression, - FormattedStringExpression: Union[BaseFormattedStringContent, RemovalSentinel], - FormattedStringText: Union[BaseFormattedStringContent, RemovalSentinel], - From: From, - FunctionDef: Union[BaseStatement, RemovalSentinel], - GeneratorExp: BaseExpression, - Global: Union[BaseSmallStatement, RemovalSentinel], - GreaterThan: BaseCompOp, - GreaterThanEqual: BaseCompOp, - If: Union[BaseStatement, RemovalSentinel], - IfExp: BaseExpression, - Imaginary: BaseExpression, - Import: Union[BaseSmallStatement, RemovalSentinel], - ImportAlias: Union[ImportAlias, RemovalSentinel], - ImportFrom: Union[BaseSmallStatement, RemovalSentinel], - ImportStar: ImportStar, - In: BaseCompOp, - IndentedBlock: BaseSuite, - Index: BaseSlice, - Integer: BaseExpression, - Is: BaseCompOp, - IsNot: BaseCompOp, - Lambda: BaseExpression, - LeftCurlyBrace: LeftCurlyBrace, - LeftParen: Union[LeftParen, MaybeSentinel, RemovalSentinel], - LeftShift: BaseBinaryOp, - LeftShiftAssign: BaseAugOp, - LeftSquareBracket: LeftSquareBracket, - LessThan: BaseCompOp, - LessThanEqual: BaseCompOp, - List: BaseExpression, - ListComp: BaseExpression, - Match: Union[BaseStatement, RemovalSentinel], - MatchAs: MatchPattern, - MatchCase: MatchCase, - MatchClass: MatchPattern, - MatchKeywordElement: Union[MatchKeywordElement, RemovalSentinel], - MatchList: MatchPattern, - MatchMapping: MatchPattern, - MatchMappingElement: Union[MatchMappingElement, RemovalSentinel], - MatchOr: MatchPattern, - MatchOrElement: Union[MatchOrElement, RemovalSentinel], - MatchPattern: MatchPattern, - MatchSequence: MatchPattern, - MatchSequenceElement: Union[MatchSequenceElement, RemovalSentinel], - MatchSingleton: MatchPattern, - MatchStar: MatchStar, - MatchTuple: MatchPattern, - MatchValue: MatchPattern, - MatrixMultiply: BaseBinaryOp, - MatrixMultiplyAssign: BaseAugOp, - Minus: BaseUnaryOp, - Module: Module, - Modulo: BaseBinaryOp, - ModuloAssign: BaseAugOp, - Multiply: BaseBinaryOp, - MultiplyAssign: BaseAugOp, - Name: BaseExpression, - NameItem: Union[NameItem, RemovalSentinel], - NamedExpr: BaseExpression, - Newline: Newline, - Nonlocal: Union[BaseSmallStatement, RemovalSentinel], - Not: BaseUnaryOp, - NotEqual: BaseCompOp, - NotIn: BaseCompOp, - Or: BaseBooleanOp, - Param: Union[Param, MaybeSentinel, RemovalSentinel], - ParamSlash: Union[ParamSlash, MaybeSentinel], - ParamSpec: ParamSpec, - ParamStar: Union[ParamStar, MaybeSentinel], - Parameters: Parameters, - ParenthesizedWhitespace: Union[BaseParenthesizableWhitespace, MaybeSentinel], - Pass: Union[BaseSmallStatement, RemovalSentinel], - Plus: BaseUnaryOp, - Power: BaseBinaryOp, - PowerAssign: BaseAugOp, - Raise: Union[BaseSmallStatement, RemovalSentinel], - Return: Union[BaseSmallStatement, RemovalSentinel], - RightCurlyBrace: RightCurlyBrace, - RightParen: Union[RightParen, MaybeSentinel, RemovalSentinel], - RightShift: BaseBinaryOp, - RightShiftAssign: BaseAugOp, - RightSquareBracket: RightSquareBracket, - Semicolon: Union[Semicolon, MaybeSentinel], - Set: BaseExpression, - SetComp: BaseExpression, - SimpleStatementLine: Union[BaseStatement, RemovalSentinel], - SimpleStatementSuite: BaseSuite, - SimpleString: BaseExpression, - SimpleWhitespace: Union[BaseParenthesizableWhitespace, MaybeSentinel], - Slice: BaseSlice, - StarredDictElement: Union[BaseDictElement, RemovalSentinel], - StarredElement: BaseExpression, - Subscript: BaseExpression, - SubscriptElement: Union[SubscriptElement, RemovalSentinel], - Subtract: BaseBinaryOp, - SubtractAssign: BaseAugOp, - TrailingWhitespace: TrailingWhitespace, - Try: Union[BaseStatement, RemovalSentinel], - TryStar: Union[BaseStatement, RemovalSentinel], - Tuple: BaseExpression, - TypeAlias: Union[BaseSmallStatement, RemovalSentinel], - TypeParam: Union[TypeParam, RemovalSentinel], - TypeParameters: TypeParameters, - TypeVar: TypeVar, - TypeVarTuple: TypeVarTuple, - UnaryOperation: BaseExpression, - While: Union[BaseStatement, RemovalSentinel], - With: Union[BaseStatement, RemovalSentinel], - WithItem: Union[WithItem, RemovalSentinel], - Yield: BaseExpression, -} +# Copyright (c) Meta Platforms, Inc. and affiliates. +# +# This source code is licensed under the MIT license found in the +# LICENSE file in the root directory of this source tree. + + +# This file was generated by libcst.codegen.gen_type_mapping +from typing import Dict as TypingDict, Type, Union + +from libcst._maybe_sentinel import MaybeSentinel +from libcst._nodes.base import CSTNode +from libcst._nodes.expression import ( + Annotation, + Arg, + Asynchronous, + Attribute, + Await, + BaseDictElement, + BaseElement, + BaseExpression, + BaseFormattedStringContent, + BaseSlice, + BinaryOperation, + BooleanOperation, + Call, + Comparison, + ComparisonTarget, + CompFor, + CompIf, + ConcatenatedString, + Dict, + DictComp, + DictElement, + Element, + Ellipsis, + Float, + FormattedString, + FormattedStringExpression, + FormattedStringText, + From, + GeneratorExp, + IfExp, + Imaginary, + Index, + Integer, + Lambda, + LeftCurlyBrace, + LeftParen, + LeftSquareBracket, + List, + ListComp, + Name, + NamedExpr, + Param, + Parameters, + ParamSlash, + ParamStar, + RightCurlyBrace, + RightParen, + RightSquareBracket, + Set, + SetComp, + SimpleString, + Slice, + StarredDictElement, + StarredElement, + Subscript, + SubscriptElement, + Tuple, + UnaryOperation, + Yield, +) +from libcst._nodes.module import Module +from libcst._nodes.op import ( + Add, + AddAssign, + And, + AssignEqual, + BaseAugOp, + BaseBinaryOp, + BaseBooleanOp, + BaseCompOp, + BaseUnaryOp, + BitAnd, + BitAndAssign, + BitInvert, + BitOr, + BitOrAssign, + BitXor, + BitXorAssign, + Colon, + Comma, + Divide, + DivideAssign, + Dot, + Equal, + FloorDivide, + FloorDivideAssign, + GreaterThan, + GreaterThanEqual, + ImportStar, + In, + Is, + IsNot, + LeftShift, + LeftShiftAssign, + LessThan, + LessThanEqual, + MatrixMultiply, + MatrixMultiplyAssign, + Minus, + Modulo, + ModuloAssign, + Multiply, + MultiplyAssign, + Not, + NotEqual, + NotIn, + Or, + Plus, + Power, + PowerAssign, + RightShift, + RightShiftAssign, + Semicolon, + Subtract, + SubtractAssign, +) +from libcst._nodes.statement import ( + AnnAssign, + AsName, + Assert, + Assign, + AssignTarget, + AugAssign, + BaseSmallStatement, + BaseStatement, + BaseSuite, + Break, + ClassDef, + Continue, + Decorator, + Del, + Else, + ExceptHandler, + ExceptStarHandler, + Expr, + Finally, + For, + FunctionDef, + Global, + If, + Import, + ImportAlias, + ImportFrom, + IndentedBlock, + Match, + MatchAs, + MatchCase, + MatchClass, + MatchKeywordElement, + MatchList, + MatchMapping, + MatchMappingElement, + MatchOr, + MatchOrElement, + MatchPattern, + MatchSequence, + MatchSequenceElement, + MatchSingleton, + MatchStar, + MatchTuple, + MatchValue, + NameItem, + Nonlocal, + ParamSpec, + Pass, + Raise, + Return, + SimpleStatementLine, + SimpleStatementSuite, + Try, + TryStar, + TypeAlias, + TypeParam, + TypeParameters, + TypeVar, + TypeVarTuple, + While, + With, + WithItem, +) +from libcst._nodes.whitespace import ( + BaseParenthesizableWhitespace, + Comment, + EmptyLine, + Newline, + ParenthesizedWhitespace, + SimpleWhitespace, + TrailingWhitespace, +) +from libcst._removal_sentinel import RemovalSentinel + +TYPED_FUNCTION_RETURN_MAPPING: TypingDict[Type[CSTNode], object] = { + Add: BaseBinaryOp, + AddAssign: BaseAugOp, + And: BaseBooleanOp, + AnnAssign: Union[BaseSmallStatement, RemovalSentinel], + Annotation: Annotation, + Arg: Union[Arg, RemovalSentinel], + AsName: AsName, + Assert: Union[BaseSmallStatement, RemovalSentinel], + Assign: Union[BaseSmallStatement, RemovalSentinel], + AssignEqual: Union[AssignEqual, MaybeSentinel], + AssignTarget: Union[AssignTarget, RemovalSentinel], + Asynchronous: Asynchronous, + Attribute: BaseExpression, + AugAssign: Union[BaseSmallStatement, RemovalSentinel], + Await: BaseExpression, + BinaryOperation: BaseExpression, + BitAnd: BaseBinaryOp, + BitAndAssign: BaseAugOp, + BitInvert: BaseUnaryOp, + BitOr: Union[BaseBinaryOp, MaybeSentinel], + BitOrAssign: BaseAugOp, + BitXor: BaseBinaryOp, + BitXorAssign: BaseAugOp, + BooleanOperation: BaseExpression, + Break: Union[BaseSmallStatement, RemovalSentinel], + Call: BaseExpression, + ClassDef: Union[BaseStatement, RemovalSentinel], + Colon: Union[Colon, MaybeSentinel], + Comma: Union[Comma, MaybeSentinel], + Comment: Comment, + CompFor: CompFor, + CompIf: CompIf, + Comparison: BaseExpression, + ComparisonTarget: Union[ComparisonTarget, RemovalSentinel], + ConcatenatedString: BaseExpression, + Continue: Union[BaseSmallStatement, RemovalSentinel], + Decorator: Union[Decorator, RemovalSentinel], + Del: Union[BaseSmallStatement, RemovalSentinel], + Dict: BaseExpression, + DictComp: BaseExpression, + DictElement: Union[BaseDictElement, RemovalSentinel], + Divide: BaseBinaryOp, + DivideAssign: BaseAugOp, + Dot: Union[Dot, RemovalSentinel], + Element: Union[BaseElement, RemovalSentinel], + Ellipsis: BaseExpression, + Else: Else, + EmptyLine: Union[EmptyLine, RemovalSentinel], + Equal: BaseCompOp, + ExceptHandler: Union[ExceptHandler, RemovalSentinel], + ExceptStarHandler: Union[ExceptStarHandler, RemovalSentinel], + Expr: Union[BaseSmallStatement, RemovalSentinel], + Finally: Finally, + Float: BaseExpression, + FloorDivide: BaseBinaryOp, + FloorDivideAssign: BaseAugOp, + For: Union[BaseStatement, RemovalSentinel], + FormattedString: BaseExpression, + FormattedStringExpression: Union[BaseFormattedStringContent, RemovalSentinel], + FormattedStringText: Union[BaseFormattedStringContent, RemovalSentinel], + From: From, + FunctionDef: Union[BaseStatement, RemovalSentinel], + GeneratorExp: BaseExpression, + Global: Union[BaseSmallStatement, RemovalSentinel], + GreaterThan: BaseCompOp, + GreaterThanEqual: BaseCompOp, + If: Union[BaseStatement, RemovalSentinel], + IfExp: BaseExpression, + Imaginary: BaseExpression, + Import: Union[BaseSmallStatement, RemovalSentinel], + ImportAlias: Union[ImportAlias, RemovalSentinel], + ImportFrom: Union[BaseSmallStatement, RemovalSentinel], + ImportStar: ImportStar, + In: BaseCompOp, + IndentedBlock: BaseSuite, + Index: BaseSlice, + Integer: BaseExpression, + Is: BaseCompOp, + IsNot: BaseCompOp, + Lambda: BaseExpression, + LeftCurlyBrace: LeftCurlyBrace, + LeftParen: Union[LeftParen, MaybeSentinel, RemovalSentinel], + LeftShift: BaseBinaryOp, + LeftShiftAssign: BaseAugOp, + LeftSquareBracket: LeftSquareBracket, + LessThan: BaseCompOp, + LessThanEqual: BaseCompOp, + List: BaseExpression, + ListComp: BaseExpression, + Match: Union[BaseStatement, RemovalSentinel], + MatchAs: MatchPattern, + MatchCase: MatchCase, + MatchClass: MatchPattern, + MatchKeywordElement: Union[MatchKeywordElement, RemovalSentinel], + MatchList: MatchPattern, + MatchMapping: MatchPattern, + MatchMappingElement: Union[MatchMappingElement, RemovalSentinel], + MatchOr: MatchPattern, + MatchOrElement: Union[MatchOrElement, RemovalSentinel], + MatchPattern: MatchPattern, + MatchSequence: MatchPattern, + MatchSequenceElement: Union[MatchSequenceElement, RemovalSentinel], + MatchSingleton: MatchPattern, + MatchStar: MatchStar, + MatchTuple: MatchPattern, + MatchValue: MatchPattern, + MatrixMultiply: BaseBinaryOp, + MatrixMultiplyAssign: BaseAugOp, + Minus: BaseUnaryOp, + Module: Module, + Modulo: BaseBinaryOp, + ModuloAssign: BaseAugOp, + Multiply: BaseBinaryOp, + MultiplyAssign: BaseAugOp, + Name: BaseExpression, + NameItem: Union[NameItem, RemovalSentinel], + NamedExpr: BaseExpression, + Newline: Newline, + Nonlocal: Union[BaseSmallStatement, RemovalSentinel], + Not: BaseUnaryOp, + NotEqual: BaseCompOp, + NotIn: BaseCompOp, + Or: BaseBooleanOp, + Param: Union[Param, MaybeSentinel, RemovalSentinel], + ParamSlash: Union[ParamSlash, MaybeSentinel], + ParamSpec: ParamSpec, + ParamStar: Union[ParamStar, MaybeSentinel], + Parameters: Parameters, + ParenthesizedWhitespace: Union[BaseParenthesizableWhitespace, MaybeSentinel], + Pass: Union[BaseSmallStatement, RemovalSentinel], + Plus: BaseUnaryOp, + Power: BaseBinaryOp, + PowerAssign: BaseAugOp, + Raise: Union[BaseSmallStatement, RemovalSentinel], + Return: Union[BaseSmallStatement, RemovalSentinel], + RightCurlyBrace: RightCurlyBrace, + RightParen: Union[RightParen, MaybeSentinel, RemovalSentinel], + RightShift: BaseBinaryOp, + RightShiftAssign: BaseAugOp, + RightSquareBracket: RightSquareBracket, + Semicolon: Union[Semicolon, MaybeSentinel], + Set: BaseExpression, + SetComp: BaseExpression, + SimpleStatementLine: Union[BaseStatement, RemovalSentinel], + SimpleStatementSuite: BaseSuite, + SimpleString: BaseExpression, + SimpleWhitespace: Union[BaseParenthesizableWhitespace, MaybeSentinel], + Slice: BaseSlice, + StarredDictElement: Union[BaseDictElement, RemovalSentinel], + StarredElement: BaseExpression, + Subscript: BaseExpression, + SubscriptElement: Union[SubscriptElement, RemovalSentinel], + Subtract: BaseBinaryOp, + SubtractAssign: BaseAugOp, + TrailingWhitespace: TrailingWhitespace, + Try: Union[BaseStatement, RemovalSentinel], + TryStar: Union[BaseStatement, RemovalSentinel], + Tuple: BaseExpression, + TypeAlias: Union[BaseSmallStatement, RemovalSentinel], + TypeParam: Union[TypeParam, RemovalSentinel], + TypeParameters: TypeParameters, + TypeVar: TypeVar, + TypeVarTuple: TypeVarTuple, + UnaryOperation: BaseExpression, + While: Union[BaseStatement, RemovalSentinel], + With: Union[BaseStatement, RemovalSentinel], + WithItem: Union[WithItem, RemovalSentinel], + Yield: BaseExpression, +}