MCPcopy
hub / github.com/python/mypy / set_line

Method set_line

mypy/fastparse.py:428–434  ·  view source on GitHub ↗
(self, node: N, n: AstNode)

Source from the content-addressed store, hash-verified

426 return visitor(node)
427
428 def set_line(self, node: N, n: AstNode) -> N:
429 node.line = n.lineno
430 node.column = n.col_offset
431 node.end_line = n.end_lineno
432 node.end_column = n.end_col_offset
433
434 return node
435
436 def translate_opt_expr_list(self, l: Sequence[AST | None]) -> list[Expression | None]:
437 res: list[Expression | None] = []

Callers 15

do_func_defMethod · 0.95
visit_ClassDefMethod · 0.95
visit_ReturnMethod · 0.95
visit_DeleteMethod · 0.95
visit_AssignMethod · 0.95
visit_AnnAssignMethod · 0.95
visit_AugAssignMethod · 0.95
visit_ForMethod · 0.95
visit_AsyncForMethod · 0.95
visit_WhileMethod · 0.95
visit_IfMethod · 0.95
visit_WithMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected