await-outside-async (PLE1142)
Derived from the Pylint linter.
What it does
Checks for uses of await
outside async
functions.
Why is this bad?
Using await
outside an async
function is a syntax error.
Example
Use instead:
Notebook behavior
As an exception, await
is allowed at the top level of a Jupyter notebook
(see: autoawait).