missing-receives¶
Part of: Enrichment Check
| Check | enrichment |
| Category | required |
| Applies to | functions, methods |
| Since | v1.0.0 |
Generator uses send pattern but has no Receives section
What it detects¶
This rule flags generator functions that use the send pattern (value = yield) but have no Receives: section in their docstring.
Why is this a problem?¶
Callers using .send() on the generator don't know what values it accepts. Without a Receives: section, the two-way communication contract is undocumented, making the generator error-prone to use. This is especially problematic for coroutine-style generators where the sent value drives behavior.