trio-timeout-without-await (TRIO100)#
Derived from the flake8-trio linter.
This rule is unstable and in preview. The --preview
flag is required for use.
What it does#
Checks for trio functions that should contain await but don't.
Why is this bad?#
Some trio context managers, such as trio.fail_after
and
trio.move_on_after
, have no effect unless they contain an await
statement. The use of such functions without an await
statement is
likely a mistake.
Example#
Use instead: