MCPcopy Index your code
hub / github.com/python/mypy / FindYield

Class FindYield

mypy/fastparse.py:2226–2236  ·  view source on GitHub ↗

Check if an AST contains yields or yield froms.

Source from the content-addressed store, hash-verified

2224
2225
2226class FindYield(TraverserVisitor):
2227 """Check if an AST contains yields or yield froms.""" # codespell:ignore froms
2228
2229 def __init__(self) -> None:
2230 self.found = False
2231
2232 def visit_yield_expr(self, e: YieldExpr) -> None:
2233 self.found = True
2234
2235 def visit_yield_from_expr(self, e: YieldFromExpr) -> None:
2236 self.found = True
2237
2238
2239def is_possible_trivial_body(s: list[Statement]) -> bool:

Callers 1

translate_stmt_listMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…