MCPcopy Index your code
hub / github.com/RustPython/RustPython / visit_FunctionDef

Method visit_FunctionDef

Lib/pyclbr.py:220–228  ·  view source on GitHub ↗
(self, node, *, is_async=False)

Source from the content-addressed store, hash-verified

218 self.stack.pop()
219
220 def visit_FunctionDef(self, node, *, is_async=False):
221 parent = self.stack[-1] if self.stack else None
222 function = Function(self.module, node.name, self.file, node.lineno,
223 parent, is_async, end_lineno=node.end_lineno)
224 if parent is None:
225 self.tree[node.name] = function
226 self.stack.append(function)
227 self.generic_visit(node)
228 self.stack.pop()
229
230 def visit_AsyncFunctionDef(self, node):
231 self.visit_FunctionDef(node, is_async=True)

Callers 1

Calls 4

FunctionClass · 0.70
appendMethod · 0.45
generic_visitMethod · 0.45
popMethod · 0.45

Tested by

no test coverage detected