missing-yields¶
Part of: Enrichment Check
| Check | enrichment |
| Category | required |
| Applies to | functions, methods |
| Since | v1.0.0 |
Generator yields values but has no Yields section
What it detects¶
This rule flags generator functions that contain yield or yield from statements but have no Yields: section in their docstring.
Why is this a problem?¶
Consumers of the generator don't know what values it produces. Without a Yields: section, callers must read the source code to understand the iteration contract. API documentation generated by mkdocstrings will also lack yield information, making the generator's interface opaque.