MCPcopy Create free account
hub / github.com/python/mypy / get_lineno

Method get_lineno

mypy/fastparse.py:446–452  ·  view source on GitHub ↗
(self, node: ast3.expr | ast3.stmt)

Source from the content-addressed store, hash-verified

444 return cast(list[Expression], self.translate_opt_expr_list(l))
445
446 def get_lineno(self, node: ast3.expr | ast3.stmt) -> int:
447 if (
448 isinstance(node, (ast3.AsyncFunctionDef, ast3.ClassDef, ast3.FunctionDef))
449 and node.decorator_list
450 ):
451 return node.decorator_list[0].lineno
452 return node.lineno
453
454 def translate_stmt_list(
455 self,

Callers 1

translate_stmt_listMethod · 0.95

Calls 1

isinstanceFunction · 0.85

Tested by

no test coverage detected