trio-sync-call (TRIO105)#
Derived from the flake8-trio linter.
Fix is sometimes available.
This rule is unstable and in preview. The --preview
flag is required for use.
What it does#
Checks for calls to trio functions that are not immediately awaited.
Why is this bad?#
Many of the functions exposed by trio are asynchronous, and must be awaited
to take effect. Calling a trio function without an await
can lead to
RuntimeWarning
diagnostics and unexpected behaviour.
Example#
Use instead:
Fix safety#
This rule's fix is marked as unsafe, as adding an await
to a function
call changes its semantics and runtime behavior.