pylint-errors

E1700 (yield-inside-async-function)

:x: Problematic code:

async def foo():
    yield 42
    yield from [1, 2, 3]

:heavy_check_mark: Correct code:

async def foo():
    def _inner_foo():
        yield 42
        yield from [1, 2, 3]

Rationale:

Used when an yield or yield from statement is found inside an async function. This message belongs to the async checker. It can’t be emitted when using Python < 3.5.