You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expected behavior
What was supposed to happen?
% ruff check --select=ASYNC --statistics
No errors.
% ruff rule ASYNC230
blocking-open-call-in-async-function (ASYNC230)
Derived from the flake8-async linter.
What it does
Checks that async functions do not open files with blocking methods like open.
Why is this bad?
Blocking an async function via a blocking call will block the entire
event loop, preventing it from executing other tasks while waiting for the
call to complete, negating the benefits of asynchronous programming.
Instead of making a blocking call, use an equivalent asynchronous library
or function.
Checks that async functions do not run processes with blocking methods.
Why is this bad?
Blocking an async function via a blocking call will block the entire
event loop, preventing it from executing other tasks while waiting for the
call to complete, negating the benefits of asynchronous programming.
Instead of making a blocking call, use an equivalent asynchronous library
or function.
Describe the bug
%
ruff check --select=ASYNC --statistics
Expected behavior
What was supposed to happen?
%
ruff check --select=ASYNC --statistics
%
ruff rule ASYNC230
blocking-open-call-in-async-function (ASYNC230)
Derived from the flake8-async linter.
What it does
Checks that async functions do not open files with blocking methods like
open
.Why is this bad?
Blocking an async function via a blocking call will block the entire
event loop, preventing it from executing other tasks while waiting for the
call to complete, negating the benefits of asynchronous programming.
Instead of making a blocking call, use an equivalent asynchronous library
or function.
Example
Use instead:
%
ruff rule ASYNC221
run-process-in-async-function (ASYNC221)
Derived from the flake8-async linter.
What it does
Checks that async functions do not run processes with blocking methods.
Why is this bad?
Blocking an async function via a blocking call will block the entire
event loop, preventing it from executing other tasks while waiting for the
call to complete, negating the benefits of asynchronous programming.
Instead of making a blocking call, use an equivalent asynchronous library
or function.
Example
Use instead:
The text was updated successfully, but these errors were encountered: