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

Method visit_func_def

mypyc/annotate.py:260–269  ·  view source on GitHub ↗
(self, o: FuncDef, /)

Source from the content-addressed store, hash-verified

258 self.mapper = mapper
259
260 def visit_func_def(self, o: FuncDef, /) -> None:
261 if self.func_depth > 0:
262 self.annotate(
263 o,
264 "A nested function object is allocated each time statement is executed. "
265 + "A module-level function would be faster.",
266 )
267 self.func_depth += 1
268 super().visit_func_def(o)
269 self.func_depth -= 1
270
271 def visit_for_stmt(self, o: ForStmt, /) -> None:
272 self.check_iteration([o.expr], "For loop")

Callers

nothing calls this directly

Calls 1

annotateMethod · 0.95

Tested by

no test coverage detected