MCPcopy
hub / github.com/psf/black / visit_async_stmt

Method visit_async_stmt

src/black/linegen.py:335–349  ·  view source on GitHub ↗

Visit `async def`, `async for`, `async with`.

(self, node: Node)

Source from the content-addressed store, hash-verified

333 yield from self.visit_default(node)
334
335 def visit_async_stmt(self, node: Node) -> Iterator[Line]:
336 """Visit `async def`, `async for`, `async with`."""
337 yield from self.line()
338
339 children = iter(node.children)
340 for child in children:
341 yield from self.visit(child)
342
343 if child.type == token.ASYNC or child.type == STANDALONE_COMMENT:
344 # STANDALONE_COMMENT happens when `# fmt: skip` is applied on the async
345 # line.
346 break
347
348 internal_stmt = next(children)
349 yield from self.visit(internal_stmt)
350
351 def visit_decorators(self, node: Node) -> Iterator[Line]:
352 """Visit decorators."""

Callers

nothing calls this directly

Calls 2

lineMethod · 0.95
visitMethod · 0.80

Tested by

no test coverage detected