Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def _visit_and_replace_children(self, visitor: CSTVisitorT) -> "ExceptHandler":
return ExceptHandler(
leading_lines=visit_sequence(
self, "leading_lines", self.leading_lines, visitor
),
whitespace_after_except=visit_required(
self, "whitespace_after_except", self.whitespace_after_except, visitor
),
type=visit_optional(self, "type", self.type, visitor),
name=visit_optional(self, "name", self.name, visitor),
whitespace_before_colon=visit_required(
self, "whitespace_before_colon", self.whitespace_before_colon, visitor
),
body=visit_required(self, "body", self.body, visitor),
)
def _visit_and_replace_children(self, visitor: CSTVisitorT) -> "Integer":
return Integer(
lpar=visit_sequence(self, "lpar", self.lpar, visitor),
value=self.value,
rpar=visit_sequence(self, "rpar", self.rpar, visitor),
)
def _visit_and_replace_children(self, visitor: CSTVisitorT) -> "Nonlocal":
return Nonlocal(
whitespace_after_nonlocal=visit_required(
self,
"whitespace_after_nonlocal",
self.whitespace_after_nonlocal,
visitor,
),
names=visit_sequence(self, "names", self.names, visitor),
semicolon=visit_sentinel(self, "semicolon", self.semicolon, visitor),
)
def _visit_and_replace_children(self, visitor: CSTVisitorT) -> "IndentedBlock":
return IndentedBlock(
header=visit_required(self, "header", self.header, visitor),
indent=self.indent,
body=visit_body_sequence(self, "body", self.body, visitor),
footer=visit_sequence(self, "footer", self.footer, visitor),
)
def _visit_and_replace_children(self, visitor: CSTVisitorT) -> "Tuple":
return Tuple(
lpar=visit_sequence(self, "lpar", self.lpar, visitor),
elements=visit_sequence(self, "elements", self.elements, visitor),
rpar=visit_sequence(self, "rpar", self.rpar, visitor),
)
def _visit_and_replace_children(self, visitor: CSTVisitorT) -> "Assign":
return Assign(
targets=visit_sequence(self, "targets", self.targets, visitor),
value=visit_required(self, "value", self.value, visitor),
semicolon=visit_sentinel(self, "semicolon", self.semicolon, visitor),
)
def _visit_and_replace_children(self, visitor: CSTVisitorT) -> "Set":
return Set(
lpar=visit_sequence(self, "lpar", self.lpar, visitor),
lbrace=visit_required(self, "lbrace", self.lbrace, visitor),
elements=visit_sequence(self, "elements", self.elements, visitor),
rbrace=visit_required(self, "rbrace", self.rbrace, visitor),
rpar=visit_sequence(self, "rpar", self.rpar, visitor),
)
def _visit_and_replace_children(self, visitor: CSTVisitorT) -> "With":
return With(
leading_lines=visit_sequence(
self, "leading_lines", self.leading_lines, visitor
),
asynchronous=visit_optional(
self, "asynchronous", self.asynchronous, visitor
),
whitespace_after_with=visit_required(
self, "whitespace_after_with", self.whitespace_after_with, visitor
),
items=visit_sequence(self, "items", self.items, visitor),
whitespace_before_colon=visit_required(
self, "whitespace_before_colon", self.whitespace_before_colon, visitor
),
body=visit_required(self, "body", self.body, visitor),
)
def _visit_and_replace_children(self, visitor: CSTVisitorT) -> "GeneratorExp":
return GeneratorExp(
lpar=visit_sequence(self, "lpar", self.lpar, visitor),
elt=visit_required(self, "elt", self.elt, visitor),
for_in=visit_required(self, "for_in", self.for_in, visitor),
rpar=visit_sequence(self, "rpar", self.rpar, visitor),
)
def _visit_and_replace_children(self, visitor: CSTVisitorT) -> "Dict":
return Dict(
lpar=visit_sequence(self, "lpar", self.lpar, visitor),
lbrace=visit_required(self, "lbrace", self.lbrace, visitor),
elements=visit_sequence(self, "elements", self.elements, visitor),
rbrace=visit_required(self, "rbrace", self.rbrace, visitor),
rpar=visit_sequence(self, "rpar", self.rpar, visitor),
)