MCPcopy Index your code
hub / github.com/python/cpython / visit_AnnAssign

Method visit_AnnAssign

Lib/_ast_unparse.py:269–277  ·  view source on GitHub ↗
(self, node)

Source from the content-addressed store, hash-verified

267 self.traverse(node.value)
268
269 def visit_AnnAssign(self, node):
270 self.fill()
271 with self.delimit_if("(", ")", not node.simple and isinstance(node.target, Name)):
272 self.traverse(node.target)
273 self.write(": ")
274 self.traverse(node.annotation)
275 if node.value:
276 self.write(" = ")
277 self.traverse(node.value)
278
279 def visit_Return(self, node):
280 self.fill("return")

Callers

nothing calls this directly

Calls 4

fillMethod · 0.95
delimit_ifMethod · 0.95
traverseMethod · 0.95
writeMethod · 0.95

Tested by

no test coverage detected